Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
Project
Project
Details
Activity
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
ops
coco
Commits
7484164b
Commit
7484164b
authored
Sep 11, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改运行方式
parent
2999b17e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
app.py
coco/app.py
+1
-2
logger.py
coco/logger.py
+4
-3
cocod
cocod
+0
-1
No files found.
coco/app.py
View file @
7484164b
...
...
@@ -44,7 +44,6 @@ class Coco:
self
.
replay_recorder_class
=
None
self
.
command_recorder_class
=
None
self
.
_task_handler
=
None
self
.
config
=
config
init_app
(
self
)
@property
...
...
@@ -66,7 +65,7 @@ class Coco:
return
self
.
_task_handler
def
make_logger
(
self
):
create_logger
(
self
)
create_logger
()
@staticmethod
def
load_extra_conf_from_server
():
...
...
coco/logger.py
View file @
7484164b
...
...
@@ -5,11 +5,12 @@
import
os
import
logging
from
logging.config
import
dictConfig
from
.config
import
config
as
app_config
def
create_logger
(
app
):
level
=
app
.
config
[
'LOG_LEVEL'
]
log_dir
=
app
.
config
.
get
(
'LOG_DIR'
)
def
create_logger
():
level
=
app
_
config
[
'LOG_LEVEL'
]
log_dir
=
app
_
config
.
get
(
'LOG_DIR'
)
log_path
=
os
.
path
.
join
(
log_dir
,
'coco.log'
)
main_setting
=
{
'handlers'
:
[
'console'
,
'file'
],
...
...
cocod
View file @
7484164b
...
...
@@ -28,7 +28,6 @@ DAEMON = False
PID_FILE
=
os
.
path
.
join
(
BASE_DIR
,
'coco.pid'
)
coco
=
Coco
()
coco
.
config
.
from_object
(
config
)
def
check_pid
(
pid
):
...
...
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