Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.cmdline
Commits
af5ae886
Commit
af5ae886
authored
Jul 06, 2018
by
Samuel GAIST
Browse files
[scripts][main_cli] Only modify the logger format when showing debug messages
Fixes
#40
parent
42b9eb48
Pipeline
#21664
passed with stages
in 34 minutes and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beat/cmdline/scripts/main_cli.py
View file @
af5ae886
...
...
@@ -70,7 +70,7 @@ def main(ctx, test_mode, version, prefix, cache, user, token, platform, editor):
console_handler
.
setLevel
(
logging
.
INFO
)
# default level
format_str
=
"%(message)s"
if
'verbosity'
in
ctx
.
meta
and
ctx
.
meta
[
'verbosity'
]
>
=
2
:
if
'verbosity'
in
ctx
.
meta
and
ctx
.
meta
[
'verbosity'
]
>
2
:
format_str
=
"[%(asctime)s - %(name)s] %(levelname)s: %(message)s"
formatter
=
logging
.
Formatter
(
format_str
,
datefmt
=
"%d/%b/%Y %H:%M:%S"
)
...
...
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