exosim.log#

Submodules#

Attributes#

Functions#

trace(self, message, *args, **kws)

Log TRACE level.

announce(self, message, *args, **kws)

Log ANNOUNCE level.

graphics(self, message, *args, **kws)

Log GRAPHICS level.

setLogLevel(level[, log_id])

Simple function to set the logger level

disableLogging([log_id])

It disables the logging setting the log level to ERROR.

enableLogging([level, log_id])

It disables the logging setting the log level to ERROR.

addHandler(handler)

It adds a handler to the logging handlers list.

addLogFile([fname, reset, level])

It adds a log file to the handlers list.

Package Contents#

last_log[source]#
trace(self, message, *args, **kws)[source]#

Log TRACE level. Trace level log should be produced anytime a function or a method is entered and exited.

Parameters:

message (str) –

Return type:

None

announce(self, message, *args, **kws)[source]#

Log ANNOUNCE level. This level log should be produced for huge announcements, as the starting of a long process.

graphics(self, message, *args, **kws)[source]#

Log GRAPHICS level. This level log should be produced for graphical reasons only.

setLogLevel(level, log_id=0)[source]#

Simple function to set the logger level

Parameters:
  • level (logging level) –

  • log_id (int) – this is the index of the handler to edit. The basic handler index is 0. Every added handler is appended to the list. Default is 0.

Return type:

None

disableLogging(log_id=0)[source]#

It disables the logging setting the log level to ERROR.

Parameters:

log_id (int) – this is the index of the handler to edit. The basic handler index is 0. Every added handler is appended to the list. Default is 0.

Return type:

None

enableLogging(level=logging.INFO, log_id=0)[source]#

It disables the logging setting the log level to ERROR.

Parameters:
  • level (logging level) – Default is logging.INFO.

  • log_id (int) – this is the index of the handler to edit. The basic handler index is 0. Every added handler is appended to the list. Default is 0.

Return type:

None

addHandler(handler)[source]#

It adds a handler to the logging handlers list.

Parameters:

handler (logging handler) –

Return type:

None

addLogFile(fname='{}.log'.format(__pkg_name__), reset=False, level=logging.DEBUG)[source]#

It adds a log file to the handlers list.

Parameters:
  • fname (str) – name for the log file. Default is exosim.log.

  • reset (bool) – it reset the log file if it exists already. Default is False.

  • level (logging level) – Default is logging.INFO.

Return type:

None