Python logbook.TRACE Examples
The following are 8
code examples of logbook.TRACE().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
logbook
, or try the search function
.
Example #1
Source File: logging.py From restful-services-in-pyramid with MIT License | 6 votes |
def global_init(logfile): if logfile: logbook.TimedRotatingFileHandler( logfile, level=logbook.INFO, date_format='%Y-%m-%d').push_application() else: logbook.StreamHandler(sys.stdout, level=logbook.TRACE).push_application()
Example #2
Source File: log_service.py From python-for-entrepreneurs-course-demos with MIT License | 5 votes |
def __get_logbook_logging_level(level_str): # logbook levels: # CRITICAL = 15 # ERROR = 14 # WARNING = 13 # NOTICE = 12 # INFO = 11 # DEBUG = 10 # TRACE = 9 # NOTSET = 0 level_str = level_str.upper().strip() if level_str == 'CRITICAL': return logbook.CRITICAL elif level_str == 'ERROR': return logbook.ERROR elif level_str == 'WARNING': return logbook.WARNING elif level_str == 'NOTICE': return logbook.NOTICE elif level_str == 'INFO': return logbook.INFO elif level_str == 'DEBUG': return logbook.DEBUG elif level_str == 'TRACE': return logbook.TRACE elif level_str == 'NOTSET': return logbook.NOTSET else: raise ValueError("Unknown logbook log level: {}".format(level_str))
Example #3
Source File: bin.py From saltyrtc-server-python with MIT License | 5 votes |
def _get_logging_level(verbosity: int) -> LogbookLevel: import logbook return LogbookLevel({ 1: logbook.CRITICAL, 2: logbook.ERROR, 3: logbook.WARNING, 4: logbook.NOTICE, 5: logbook.INFO, 6: logbook.DEBUG, 7: logbook.TRACE, }[verbosity])
Example #4
Source File: logging.py From restful-services-in-pyramid with MIT License | 5 votes |
def global_init(logfile): if logfile: logbook.TimedRotatingFileHandler( logfile, level=logbook.INFO, date_format='%Y-%m-%d').push_application() else: logbook.StreamHandler(sys.stdout, level=logbook.TRACE).push_application()
Example #5
Source File: logging.py From restful-services-in-pyramid with MIT License | 5 votes |
def global_init(logfile): if logfile: logbook.TimedRotatingFileHandler( logfile, level=logbook.INFO, date_format='%Y-%m-%d').push_application() else: logbook.StreamHandler(sys.stdout, level=logbook.TRACE).push_application()
Example #6
Source File: logging.py From restful-services-in-pyramid with MIT License | 5 votes |
def global_init(logfile): if logfile: logbook.TimedRotatingFileHandler( logfile, level=logbook.INFO, date_format='%Y-%m-%d').push_application() else: logbook.StreamHandler(sys.stdout, level=logbook.TRACE).push_application()
Example #7
Source File: log_service.py From cookiecutter-pyramid-talk-python-starter with MIT License | 5 votes |
def __get_logbook_logging_level(level_str): # logbook levels: # CRITICAL = 15 # ERROR = 14 # WARNING = 13 # NOTICE = 12 # INFO = 11 # DEBUG = 10 # TRACE = 9 # NOTSET = 0 level_str = level_str.upper().strip() if level_str == 'CRITICAL': return logbook.CRITICAL elif level_str == 'ERROR': return logbook.ERROR elif level_str == 'WARNING': return logbook.WARNING elif level_str == 'NOTICE': return logbook.NOTICE elif level_str == 'INFO': return logbook.INFO elif level_str == 'DEBUG': return logbook.DEBUG elif level_str == 'TRACE': return logbook.TRACE elif level_str == 'NOTSET': return logbook.NOTSET else: raise ValueError("Unknown logbook log level: {}".format(level_str))
Example #8
Source File: log_service.py From cookiecutter-course with GNU General Public License v2.0 | 5 votes |
def __get_logbook_logging_level(level_str): # logbook levels: # CRITICAL = 15 # ERROR = 14 # WARNING = 13 # NOTICE = 12 # INFO = 11 # DEBUG = 10 # TRACE = 9 # NOTSET = 0 level_str = level_str.upper().strip() if level_str == 'CRITICAL': return logbook.CRITICAL elif level_str == 'ERROR': return logbook.ERROR elif level_str == 'WARNING': return logbook.WARNING elif level_str == 'NOTICE': return logbook.NOTICE elif level_str == 'INFO': return logbook.INFO elif level_str == 'DEBUG': return logbook.DEBUG elif level_str == 'TRACE': return logbook.TRACE elif level_str == 'NOTSET': return logbook.NOTSET else: raise ValueError("Unknown logbook log level: {}".format(level_str))