curobo.util.logger module¶
This module provides logging API, wrapping logging.Logger
. These functions are used
to log messages in the cuRobo package. The functions can also be used in other packages by
creating a new logger (setup_logger
) with the desired name.
- setup_logger(
- level='info',
- logger_name: str = 'curobo',
Set up logger level.
- Parameters:
level – Log level. Default is “info”. Other options are “debug”, “warning”, “error”.
logger_name – Name of the logger. Default is “curobo”.
- Raises:
ValueError – If log level is not one of [info, debug, warning, error].
- setup_curobo_logger(level='info')¶
Set up logger level for curobo package. Deprecated. Use
setup_logger
instead.
- log_warn( )¶
Log warning message. Also see
logging.Logger.warning
.- Parameters:
txt – Warning message.
logger_name – Name of the logger. Default is “curobo”.
- log_info( )¶
Log info message. Also see
logging.Logger.info
.- Parameters:
txt – Info message.
logger_name – Name of the logger. Default is “curobo”.
- log_error(
- txt: str,
- logger_name: str = 'curobo',
- exc_info=True,
- stack_info=False,
- stacklevel: int = 2,
- *args,
- **kwargs,
Log error and raise ValueError.
- Parameters:
txt – Helpful message that conveys the error.
logger_name – Name of the logger. Default is “curobo”.
exc_info – Add exception info to message. See
logging.Logger.error
.stack_info – Add stacktracke to message. See
logging.Logger.error
.stacklevel – See
logging.Logger.error
. Default value of 2 removes this function from the stack trace.
- Raises:
ValueError – Error message with exception.