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
12ab6c8e
Commit
12ab6c8e
authored
Sep 11, 2018
by
广宏伟
Browse files
Options
Browse Files
Download
Plain Diff
Merged in dev (pull request #96)
[Update] 修改运行方式
parents
73c72da3
7484164b
Hide 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 @
12ab6c8e
...
@@ -44,7 +44,6 @@ class Coco:
...
@@ -44,7 +44,6 @@ class Coco:
self
.
replay_recorder_class
=
None
self
.
replay_recorder_class
=
None
self
.
command_recorder_class
=
None
self
.
command_recorder_class
=
None
self
.
_task_handler
=
None
self
.
_task_handler
=
None
self
.
config
=
config
init_app
(
self
)
init_app
(
self
)
@property
@property
...
@@ -66,7 +65,7 @@ class Coco:
...
@@ -66,7 +65,7 @@ class Coco:
return
self
.
_task_handler
return
self
.
_task_handler
def
make_logger
(
self
):
def
make_logger
(
self
):
create_logger
(
self
)
create_logger
()
@staticmethod
@staticmethod
def
load_extra_conf_from_server
():
def
load_extra_conf_from_server
():
...
...
coco/logger.py
View file @
12ab6c8e
...
@@ -5,11 +5,12 @@
...
@@ -5,11 +5,12 @@
import
os
import
os
import
logging
import
logging
from
logging.config
import
dictConfig
from
logging.config
import
dictConfig
from
.config
import
config
as
app_config
def
create_logger
(
app
):
def
create_logger
():
level
=
app
.
config
[
'LOG_LEVEL'
]
level
=
app
_
config
[
'LOG_LEVEL'
]
log_dir
=
app
.
config
.
get
(
'LOG_DIR'
)
log_dir
=
app
_
config
.
get
(
'LOG_DIR'
)
log_path
=
os
.
path
.
join
(
log_dir
,
'coco.log'
)
log_path
=
os
.
path
.
join
(
log_dir
,
'coco.log'
)
main_setting
=
{
main_setting
=
{
'handlers'
:
[
'console'
,
'file'
],
'handlers'
:
[
'console'
,
'file'
],
...
...
cocod
View file @
12ab6c8e
...
@@ -28,7 +28,6 @@ DAEMON = False
...
@@ -28,7 +28,6 @@ DAEMON = False
PID_FILE
=
os
.
path
.
join
(
BASE_DIR
,
'coco.pid'
)
PID_FILE
=
os
.
path
.
join
(
BASE_DIR
,
'coco.pid'
)
coco
=
Coco
()
coco
=
Coco
()
coco
.
config
.
from_object
(
config
)
def
check_pid
(
pid
):
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