Inheritance |
|
This kind of sink can be used to send log entries to a file on disk. Some of the log entry details are lost in writing the data to disk, as each log entry is output simply as a time stamp followed by the message text. So for most situations, using the Log Viewer pane to investigate log entries will be preferable.
Tip
In order to ensure all logs are captured and committed to disk, this sink type opens the log file, writes the log entry, and closes the file for each log message. This can introduce noticeable performance issues if a large amount of information is being logged. Therefore it is strongly recommended that the destination file be local to the machine running Houdini, and preferably be kept on an SSD hard drive.
Methods ¶
__init__(filepath)
Creates a new file sink object which writes logs to the specified file path.
filePath()
→ str
Returns the path to the file where logs are written.
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.