Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
R
robo-dividend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenwen.tang
robo-dividend
Commits
de183621
Commit
de183621
authored
Nov 04, 2022
by
纪超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成日志、配置文件、数据库工具模块
parent
b9e1b1e9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
6 deletions
+6
-6
config.yml
config.yml
+3
-2
__init__.py
datas/__init__.py
+0
-0
__init__.py
datas/fund_info/__init__.py
+0
-0
base_info.py
datas/fund_info/base_info.py
+0
-0
main.py
main.py
+1
-1
__logger.py
utils/__logger.py
+2
-3
No files found.
config.yml
View file @
de183621
...
...
@@ -10,6 +10,7 @@ email:
password
:
5dbb#30ec6d3
logger
:
version
:
1
use
:
${LOG_NAME:prod}
formatters
:
brief
:
format
:
"
%(asctime)s
-
%(levelname)s
-
%(message)s"
...
...
@@ -31,12 +32,12 @@ logger:
encoding
:
utf8
when
:
D
loggers
:
base
:
prod
:
handlers
:
[
console
,
file
]
level
:
INFO
propagate
:
0
root
:
level
:
INFO
handlers
:
[
console
,
file
]
handlers
:
[
console
]
da
o
/__init__.py
→
da
tas
/__init__.py
View file @
de183621
File moved
da
o/fund_info
.py
→
da
tas/fund_info/__init__
.py
View file @
de183621
File moved
datas/fund_info/base_info.py
0 → 100644
View file @
de183621
main.py
View file @
de183621
from
utils
import
*
if
__name__
==
'__main__'
:
print
(
dir
())
logger
.
info
(
dir
())
utils/__logger.py
View file @
de183621
...
...
@@ -4,7 +4,7 @@ from .__env_config import config
from
.base
import
get_project_path
def
build_logger
(
config
,
name
=
'
base
'
):
def
build_logger
(
config
,
name
=
'
root
'
):
if
'handlers'
in
config
and
'file'
in
config
[
'handlers'
]:
file
=
config
[
'handlers'
][
'file'
]
path
=
os
.
path
.
join
(
get_project_path
(),
file
[
"filename"
])
...
...
@@ -15,5 +15,4 @@ def build_logger(config, name='base'):
if
'logger'
in
config
:
logger
=
build_logger
(
config
[
'logger'
])
logger
=
build_logger
(
config
[
'logger'
],
name
=
config
[
'logger'
][
'use'
])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment