pyfli.log_save.logging#

Small logging helpers for PyFLI.

Functions

_format_message(msg, *args, **kwargs)

Run the format message routine.

_log(level, msg, *args, **kwargs)

Run the log routine.

configure_logging([level])

Configure PyFLI logging without overriding user logging handlers.

critical(msg, *args, **kwargs)

Run the critical routine.

debug(msg, *args, **kwargs)

Run the debug routine.

error(msg, *args, **kwargs)

Run the error routine.

exception(msg, *args, **kwargs)

Run the exception routine.

format_duration(seconds)

Format an elapsed time in seconds, minutes, or hours.

info(msg, *args, **kwargs)

Run the info routine.

log(level, msg, *args, **kwargs)

Run the log routine.

warn_once(msg, *args, **kwargs)

Run the warn once routine.

warning(msg, *args, **kwargs)

Run the warning routine.

configure_logging(level=_logging.INFO)[source]#

Configure PyFLI logging without overriding user logging handlers.

Parameters:

level (int)

Return type:

Logger

critical(msg, *args, **kwargs)[source]#

Run the critical routine.

Parameters:
  • msg (Any) – Message text emitted through the PyFLI logger.

  • *args (Any) – Additional positional values accepted by the routine.

  • **kwargs (Any) – Additional keyword options forwarded to the underlying implementation.

Returns:

No object is returned; the function perform critical.

Return type:

None

debug(msg, *args, **kwargs)[source]#

Run the debug routine.

Parameters:
  • msg (Any) – Message text emitted through the PyFLI logger.

  • *args (Any) – Additional positional values accepted by the routine.

  • **kwargs (Any) – Additional keyword options forwarded to the underlying implementation.

Returns:

No object is returned; the function perform debug.

Return type:

None

error(msg, *args, **kwargs)[source]#

Run the error routine.

Parameters:
  • msg (Any) – Message text emitted through the PyFLI logger.

  • *args (Any) – Additional positional values accepted by the routine.

  • **kwargs (Any) – Additional keyword options forwarded to the underlying implementation.

Returns:

No object is returned; the function perform error.

Return type:

None

exception(msg, *args, **kwargs)[source]#

Run the exception routine.

Parameters:
  • msg (Any) – Message text emitted through the PyFLI logger.

  • *args (Any) – Additional positional values accepted by the routine.

  • **kwargs (Any) – Additional keyword options forwarded to the underlying implementation.

Returns:

No object is returned; the function perform exception.

Return type:

None

info(msg, *args, **kwargs)[source]#

Run the info routine.

Parameters:
  • msg (Any) – Message text emitted through the PyFLI logger.

  • *args (Any) – Additional positional values accepted by the routine.

  • **kwargs (Any) – Additional keyword options forwarded to the underlying implementation.

Returns:

No object is returned; the function perform info.

Return type:

None

log(level, msg, *args, **kwargs)[source]#

Run the log routine.

Parameters:
  • level (int) – Logging severity level.

  • msg (Any) – Message text emitted through the PyFLI logger.

  • *args (Any) – Additional positional values accepted by the routine.

  • **kwargs (Any) – Additional keyword options forwarded to the underlying implementation.

Returns:

No object is returned; the function perform log.

Return type:

None

warning(msg, *args, **kwargs)[source]#

Run the warning routine.

Parameters:
  • msg (Any) – Message text emitted through the PyFLI logger.

  • *args (Any) – Additional positional values accepted by the routine.

  • **kwargs (Any) – Additional keyword options forwarded to the underlying implementation.

Returns:

No object is returned; the function perform warning.

Return type:

None

warn_once(msg, *args, **kwargs)[source]#

Run the warn once routine.

Parameters:
  • msg (Any) – Message text emitted through the PyFLI logger.

  • *args (Any) – Additional positional values accepted by the routine.

  • **kwargs (Any) – Additional keyword options forwarded to the underlying implementation.

Returns:

No object is returned; the function perform warn once.

Return type:

None

format_duration(seconds)[source]#

Format an elapsed time in seconds, minutes, or hours.

Parameters:

seconds (float) – Elapsed time in seconds.

Returns:

String path, label, or message produced by format duration.

Return type:

str