mmSolver.logger#

Unified logging for the mmSolver package.

mmSolver.logger.get_logger(level=None)#

Returns a Logger object for logging events.

If the environment variable ‘MMSOLVER_DEBUG’ is set to ‘1’, and the ‘level’ kwarg is not given, the mmSolver logger will print debug messages.

Example usage:

import mmSolver.logger
LOG = mmSolver.logger.get_logger()
LOG.info('hello world')
LOG.warning('be careful everyone')
LOG.error('something bad has happened')
Parameters:

level (str, int or None) – Set the level for the newly created Logger object.

Returns:

A Logger object.

mmSolver.logger.add_maya_viewport_handler(logger, level=None)#
class mmSolver.logger.MayaViewportHandler(*args, **kwargs)#
emit(record)#

Emit a record. Output the record to the file, catering for rollover as described in doRollover().