Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MetObs
AossCeilo
Commits
890ad462
Unverified
Commit
890ad462
authored
Sep 05, 2017
by
David Hoese
Browse files
Fix hacky logging level addition
parent
7f59db75
Changes
1
Hide whitespace changes
Inline
Side-by-side
aossceilo/ingest.py
View file @
890ad462
...
...
@@ -36,9 +36,14 @@ from datetime import datetime, timedelta
import
serial
# FIXME: bad-joo-joo
logging
.
_levelNames
[
9
]
=
'TRACE'
logging
.
_levelNames
[
'TRACE'
]
=
9
# https://stackoverflow.com/a/13638084/433202
TRACE_LEVEL_NUM
=
9
logging
.
addLevelName
(
TRACE_LEVEL_NUM
,
"TRACE"
)
def
debugv
(
self
,
message
,
*
args
,
**
kws
):
# Yes, logger takes its '*args' as 'args'.
if
self
.
isEnabledFor
(
TRACE_LEVEL_NUM
):
self
.
_log
(
TRACE_LEVEL_NUM
,
message
,
args
,
**
kws
)
logging
.
Logger
.
debugv
=
debugv
LOG
=
logging
.
getLogger
(
__name__
)
...
...
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