forked from platypush/platypush
Added utils.is_debug_enabled
.
This commit is contained in:
parent
ef3b1d20f2
commit
d5514d7f27
1 changed files with 9 additions and 0 deletions
|
@ -764,4 +764,13 @@ def get_defining_class(meth) -> Optional[type]:
|
||||||
return getattr(meth, '__objclass__', None) # handle special descriptor objects
|
return getattr(meth, '__objclass__', None) # handle special descriptor objects
|
||||||
|
|
||||||
|
|
||||||
|
def is_debug_enabled() -> bool:
|
||||||
|
"""
|
||||||
|
:return: True if the debug mode is enabled.
|
||||||
|
"""
|
||||||
|
from platypush.config import Config
|
||||||
|
|
||||||
|
return (Config.get('logging') or {}).get('level') == logging.DEBUG
|
||||||
|
|
||||||
|
|
||||||
# vim:sw=4:ts=4:et:
|
# vim:sw=4:ts=4:et:
|
||||||
|
|
Loading…
Reference in a new issue