logging
Custom loggers for Tasks.
Classes:
Name | Description |
---|---|
SocketCommunicatorHandler |
Logging handler which passes messages via LUTE SocketCommunicator objects. |
Functions:
Name | Description |
---|---|
get_logger |
str) -> logging.Logger: Grab a standard LUTE logger and reduce logging from libraries which output many messages. |
LUTE_TASK_LOG_FORMAT: str = 'TASK_LOG -- %(levelname)s:%(name)s: %(message)s'
module-attribute
Format specification for the formatter used by the standard LUTE logger.
STD_PYTHON_LOG_FORMAT: str = '%(levelname)s:%(name)s:%(message)s'
module-attribute
Default Python logging formatter specification.
ColorFormatter
Bases: Formatter
Provide color text formatting for a logger.
Source code in lute/execution/logging.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
SocketCommunicatorHandler
Bases: Handler
Logging handler which passes messages via SocketCommunicator objects.
Source code in lute/execution/logging.py
27 28 29 30 31 32 33 34 35 36 37 38 |
|
get_logger(name, is_task=True)
Retrieve a logger with LUTE handler and set log levels of other loggers.
This function returns a logger with correct log level set by the debug flag. In addition, it silences (or reduces) logs from commonly imported libraries which produce many messages that make log files hard to parse. This is particularly useful when running in debug mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the logger. |
required |
Returns:
Name | Type | Description |
---|---|---|
logger |
Logger
|
Custom logger. |
Source code in lute/execution/logging.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|