converts a log level string into its numerical equivalent. e.g. "info" => `logging.INFO`
(log_level_str)
| 181 | |
| 182 | |
| 183 | def get_log_level_from_string(log_level_str): |
| 184 | """converts a log level string into its numerical equivalent. e.g. "info" => `logging.INFO` |
| 185 | """ |
| 186 | log_level_str = log_level_str.lower() |
| 187 | if log_level_str not in log_levels: |
| 188 | raise ValueError( |
| 189 | f"{log_level_str} is not one of the valid logging levels. Valid log levels are {log_levels.keys()}.") |
| 190 | return log_levels[log_level_str] |
| 191 | |
| 192 | |
| 193 | def set_log_level_from_string(log_level_str, custom_logger=None): |
no outgoing calls
no test coverage detected