curobo.logging module

Public logging utilities for cuRobo.

Re-exports the logging helpers from curobo._src.util.logging so callers can use from curobo.logging import setup_logger without depending on private paths.

Example

from curobo.logging import setup_logger

setup_logger("info")
log_and_raise(
txt,
logger_name='curobo',
exc_info=True,
stack_info=False,
stacklevel=2,
*args,
**kwargs,
)

Log error and raise ValueError.

Parameters:
  • txt (str) – Helpful message that conveys the error.

  • logger_name (str) – 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 (int) – See logging.Logger.error. Default value of 2 removes this function from the stack trace.

Raises:

ValueError – Error message with exception.

Return type:

NoReturn

log_debug(
txt,
logger_name='curobo',
*args,
**kwargs,
)

Log debug message. Also see logging.Logger.debug.

Parameters:
log_info(
txt,
logger_name='curobo',
*args,
**kwargs,
)

Log info message. Also see logging.Logger.info.

Parameters:
  • txt (str) – Info message.

  • logger_name (str) – Name of the logger. Default is “curobo”.

log_warn(
txt,
logger_name='curobo',
*args,
**kwargs,
)

Log warning message. Also see logging.Logger.warning.

Parameters:
  • txt (str) – Warning message.

  • logger_name (str) – Name of the logger. Default is “curobo”.

setup_logger(
level='warning',
logger_name='curobo',
)

Set up logger level.

Parameters:
  • level – Log level. Default is “warning”. Other options are “info”, “debug”, “error”.

  • logger_name (str) – Name of the logger. Default is “curobo”.

Raises:

ValueError – If log level is not one of [info, debug, warning, error].