log_if#

scikitplot.logging.log_if(level, msg, condition, *args, **kwargs)[source]#

Log only if a condition is True.

Parameters:
levelint or str

Logging level.

msgstr

Log message.

conditionbool

Condition that must be True to log.

*argsAny

Message formatting args.

**kwargsAny

Passed to the underlying logger.

Parameters:
  • level (int | str)

  • msg (str)

  • condition (bool)

  • args (any)

  • kwargs (any)

Return type:

None