input4mips_validation.logging#
input4mips_validation.logging
#
Logging
LOG_LEVEL_INFO_DB_ENTRY = logger.level(name='INFO_DB_ENTRY', no=17, color='<fg #1139ed>', icon='🗄')
module-attribute
#
Logging level that gives information at the database entry level
This is between DEBUG and INFO
LOG_LEVEL_INFO_DB_ENTRY_ERROR = logger.level(name='INFO_DB_ENTRY_ERROR', no=LOG_LEVEL_INFO_DB_ENTRY.no + 1, color='<fg #ff5f00><bold>', icon='🗄')
module-attribute
#
Logging level that gives information about a failure at the database entry level
One level higher than LOG_LEVEL_INFO_DB_ENTRY.
LOG_LEVEL_INFO_FILE = logger.level(name='INFO_FILE', no=15, color='<fg #3c5ffa>', icon='ℹ')
module-attribute
#
Logging level that gives information at the file level
This is between DEBUG and INFO
LOG_LEVEL_INFO_FILE_ERROR = logger.level(name='INFO_FILE_ERROR', no=LOG_LEVEL_INFO_FILE.no + 1, color='<red><bold>', icon='❌')
module-attribute
#
Logging level that gives information about a failure at the file level
One level higher than LOG_LEVEL_INFO_FILE.
LOG_LEVEL_INFO_INDIVIDUAL_CHECK = logger.level(name='INFO_INDIVIDUAL_CHECK', no=12, color='<fg #5db7de>', icon='🔎')
module-attribute
#
Logging level that gives information at the level of individual checks
This is between DEBUG and LOG_LEVEL_INFO_FILE
LOG_LEVEL_INFO_INDIVIDUAL_CHECK_ERROR = logger.level(name='INFO_INDIVIDUAL_CHECK_ERROR', no=LOG_LEVEL_INFO_INDIVIDUAL_CHECK.no + 1, color='<fg #e3494f><bold>', icon='❌')
module-attribute
#
Logging level that gives information about a failure at the individual check level
One level higher than LOG_LEVEL_INFO_INDIVIDUAL_CHECK.
get_default_config(level=LOG_LEVEL_INFO_INDIVIDUAL_CHECK.name)
#
Get default logging configuration
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
str
|
Level to apply to the logging |
name
|
Returns:
| Type | Description |
|---|---|
ConfigLike
|
Default logging configuration |
Source code in src/input4mips_validation/logging.py
setup_logging(enable, logging_config=None, logging_level=None)
#
Early setup for logging.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enable
|
bool
|
Whether to enable the logger. If |
required |
logging_config
|
Optional[Union[Path, LoggingConfigLike]]
|
If a This takes precedence over |
None
|
logging_level
|
Optional[str]
|
Log level to apply to the default config. |
None
|
Source code in src/input4mips_validation/logging.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | |