Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Trevor Cappallo
OperationalLogging
Commits
c5d54fa1
Commit
c5d54fa1
authored
Aug 19, 2015
by
Trevor Cappallo
Browse files
log info for config file
parent
d0b1391b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
lib/OperationalLogger.py
lib/OperationalLogger.py
+2
-0
No files found.
lib/OperationalLogger.py
View file @
c5d54fa1
...
...
@@ -215,10 +215,12 @@ def setup(config_file=None, logger_name=None, log_filename=None, log_root_dir=No
if
not
os
.
path
.
exists
(
config_file
):
logging
.
warn
(
"Could not find logging config file: %s"
,
config_file
)
else
:
logging
.
debug
(
"Loading logging config from: %s"
,
config_file
)
with
open
(
config_file
,
'r'
)
as
f
:
loaded_config
=
json
.
load
(
f
)
for
key
,
val
in
loaded_config
.
items
():
if
key
in
config
and
val
is
None
:
logging
.
debug
(
"- setting option from file: %s --> %s"
,
key
,
val
)
config
[
key
]
=
val
# Set reasonable defaults for remaining Nones.
if
config
[
'log_filename'
]
is
None
:
...
...
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