add_child_logger#

Logger.add_child_logger(suffix, level=None)#

Add a child logger to the main logger.

This child logger is more general than an instance logger, which is designed to track the state of a Mechanical instance.

If the logging level is specified in the arguments, a new logger with a reference to the _global logger handlers is created instead of a child logger.

Parameters:
suffixstr

Name for the child logger.

levelstr, optional

Level of logging. The default is None, in which case the "DEBUG" level is used. Options are "DEBUG", "INFO", "WARNING", and "ERROR".

Returns:
logging.logger

Logger class.