Methods ¶
__init__(message = None, source = None, source_context = None, severity = None, verbosity = 0, time = 0.0, thread_id = 0, has_external_info = False, external_host_name = None, external_identifier = None, external_command_line = None, external_process_id = 0)
Return a new LogEntry
with the provided data members.
source()
→ str
Return the names of the source that generated this log entry.
sourceContext()
→ str
Return an optional string that identifies the “context” within the source that generated this log entry. One example is that the Node Errors
source sets this value to the path of the specific Houdini node that generated the log entry.
message()
→ str
Return the main log entry message text.
severity()
→ hou.severityType
Return an optional severity value for the log entry. This value will be set for node error logs, USD logs, and other sources with a well defined set of logging severity levels.
verbosity()
→ int
Return an optional verbosity value for the log entry. This value will be set for rendering logs, and indicates the minimum hou.logging.renderLogVerbosity() level required for Karma to generate this log entry.
time()
→ float
Return the time at which this log entry was generated. This value is expressed as the number of seconds since January 1, 1970, 00:00:00 (UTC). This value can be converted to a local time using the python time
module using code such as time.strftime("%H:%M:%S", time.localtime(log.time()))
. Although log entries from a single source should always arrive in chronological order, some sources may delay their log reporting, and so log entries may arrive at a sink out of order.
threadId()
→ int
Return a number that uniquely identifies within a given Houdini session which thread in the process generated the log entry. This can be useful to establish a chronology of log entries when multiple threads are generating logs simultaneously.
hasExternalInfo()
→ bool
Return True
if this log entry was generated by a process other than the current Houdini session. In this case, the various methods starting with external
will return meaningful information. If this method returns False
, the external
methods should not be called on this object.
externalHostName()
→ str
If the external process was running on a different machine, return the name of the machine running the process. Otherwise return an empty string.
externalIdentifier()
→ str
Return an optional string to help identify the machine or process which generated the log entry. The meaning of this value varies depending on the logging source.
externalCommandLine()
→ str
Return the full command line used to launch the external process that generated this log entry.
externalProcessId()
→ int
Return the process identifier (pid) of the process that generated the log entry.