Inheritance |
|
All log entries sent to this sink are held in memory forever unless stealLogEntries
is called. Depending on the frequency of logging, this can eventually result in a very large amount of memory being consumed by these logs, however in most normal operating circumstances this is very unlikely to be a problem.
Methods ¶
logEntries()
→ iterable
of hou.logging.LogEntry
Return an iterable object that represents all the log entries held in memory by this sink object.
stealLogEntries()
→ tuple
of hou.logging.LogEntry
Returns a tuple of all log entries that were held in memory by this sink object. In addition, all log entries owned by this sink object are cleared from memory. Thus subsequent calls to logEntries
or stealLogEntries
will not return any of these log entries again.
Methods from hou.logging.Sink ¶
connectedSources()
→ tuple
of str
Returns the names of sources connected to this sink.
connect(source_name)
Connect a source to this sink object. The source_name
should be one of the values return by a call to hou.logging.sources().
disconnect(source_name)
Disconnect a source from this sink object. The source_name
should be one of the values returned by the connectedSources
method.
setFilterCallback(callback)
Associates a callable object with this log sink which is called every time a log entry is generated by a source connected to this sink. The callback should take one argument, which is a hou.logging.LogEntry object. If this callback returns False
, the log entry will not be stored or otherwise processed by this sink object.