libranet_logging.utils
libranet_logging.utils.
Functions
Returns: |
|
Returns: |
|
|
Convert a string representation of truth to true (1) or false (0). |
Decide if this process is run in an interactive shell or not. |
|
|
Ensure the required directory exists. |
Module Contents
- libranet_logging.utils.print_tree()
Returns:
- Return type:
None
- libranet_logging.utils.print_loggers()
Returns:
- Return type:
None
- libranet_logging.utils.strtobool(val)
Convert a string representation of truth to true (1) or false (0).
True values are ‘y’, ‘yes’, ‘t’, ‘true’, ‘on’, and ‘1’; false values are ‘n’, ‘no’, ‘f’, ‘false’, ‘off’, and ‘0’. Raises ValueError if ‘val’ is anything else.
- libranet_logging.utils.is_interactive_shell()
Decide if this process is run in an interactive shell or not.
If environment-variable $TERM is present, we are running this code in a interactive shell, else we are run from cron or called via nrpe as a nagios-check.
Returns: boolean
- libranet_logging.utils.ensure_dir(required_dir)
Ensure the required directory exists.
- Parameters:
required_dir (Union[pathlib.Path, str])
- Return type:
None