Add -l/--log-level option. Honor __cdist_loglevel env var. (#572)
Add -l/--log-level option, __cdist_loglevel -> __cdist_log_level; honor __cdist_log_level env var
This commit is contained in:
parent
f08ac264a0
commit
3454da076f
23 changed files with 152 additions and 69 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#
|
||||
|
||||
import os
|
||||
import logging
|
||||
|
||||
|
||||
def listdir(path='.', include_dot=False):
|
||||
|
|
@ -34,3 +35,7 @@ def listdir(path='.', include_dot=False):
|
|||
|
||||
def _ishidden(path):
|
||||
return path[0] in ('.', b'.'[0])
|
||||
|
||||
|
||||
def log_level_env_var_val(log):
|
||||
return logging.getLevelName(log.getEffectiveLevel())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue