logInfo¶
- lsst.pipe.base.logInfo(obj, prefix, logLevel=10, metadata=None, logger=None)¶
Log timer information to
obj.metadataandobj.log.- Parameters:
- obj
lsst.pipe.base.Task-type orNone A
Taskor any other object with these two attributes:metadataan instance ofTaskMetadata(or other object withadd(name, value)method).logan instance oflogging.Loggeror subclass.
If
None, at least one ofmetadataorloggershould be passed or this function will do nothing.- prefix
str Name prefix, the resulting entries are
CpuTime, etc.. For example timeMethod usesprefix = Startwhen the method begins andprefix = Endwhen the method ends.- logLevel
int, optional Log level (an
logginglevel constant, such aslogging.DEBUG).- metadata
lsst.pipe.base.TaskMetadata, optional Metadata object to write entries to, overriding
obj.metadata.- logger
logging.Logger Log object to write entries to, overriding
obj.log.
- obj
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 usedin 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.