Custom error for unrecognised log level.
Definition at line 51 of file utils.py.
◆ __init__()
None opmonlib.utils.LogLevelError.__init__ |
( |
| self, |
|
|
str | int | level ) |
Constructor.
Definition at line 54 of file utils.py.
54 def __init__(self, level: str | int) -> None:
55 """Constructor."""
56 if isinstance(level, str):
57 err_msg = (
58 f"Level '{level}' is not one of the recognised level names "
59 f"({log_level_keys})."
60 )
61 elif isinstance(level, int):
62 err_msg = (
63 f"Level '{level}' is not one of the recognised level values "
64 f"({log_level_values})."
65 )
66 else:
67 err_msg = f"Level '{level}' is not of a supported type."
68 super().__init__(err_msg)
69
70
The documentation for this class was generated from the following file:
- /github/workspace/dunedaq/sourcecode/opmonlib/python/opmonlib/utils.py