logInfo

lsst.pipe.base.logInfo(obj, prefix, logLevel=10, metadata=None, logger=None)

Log timer information to obj.metadata and obj.log.

Parameters:
objlsst.pipe.base.Task-type or None

A Task or any other object with these two attributes:

  • metadata an instance of TaskMetadata (or other object with add(name, value) method).

  • log an instance of logging.Logger or subclass.

If None, at least one of metadata or logger should be passed or this function will do nothing.

prefixstr

Name prefix, the resulting entries are CpuTime, etc.. For example timeMethod uses prefix = Start when the method begins and prefix = End when the method ends.

logLevelint, optional

Log level (an logging level constant, such as logging.DEBUG).

metadatalsst.pipe.base.TaskMetadata, optional

Metadata object to write entries to, overriding obj.metadata.

loggerlogging.Logger

Log object to write entries to, overriding obj.log.

Notes

Logged items include:

  • Utc: UTC date in ISO format (only in metadata since log entries have timestamps).

  • CpuTime: System + User CPU time (seconds). This should only be used

    in differential measurements; the time reference point is undefined.

  • MaxRss: maximum resident set size.

All logged resource information is only for the current process; child processes are excluded.

Deprecated since version v24: logInfo has been replaced by lsst.utils.timer.logInfo. Will be removed after v25.