Daemon Log Reader¶
- class ornithology.DaemonLog(path)[source]¶
Represents the log file for a particular HTCondor daemon. Can be used to open multiple “views” (
DaemonLogStream) of the log file.Warning
You shouldn’t need to create these yourself. Instead, see the
<daemon>_logmethods onCondor.- open()[source]¶
Return a
DaemonLogStreampointing to the daemon’s log file.
- class ornithology.DaemonLogStream(file)[source]¶
-
- property lines¶
An iterator over the raw lines that have been read from the daemon log so far.
- read()[source]¶
Read lines from the daemon log and parse them into
DaemonLogMessage. Returns an iterator over the messages as they are parsed.Warning
If you do not consume the iterator, no lines will be read!
- wait(condition, timeout=120)[source]¶
Wait for some condition to be true on a
DaemonLogMessageparsed from the daemon log.- Parameters:
condition (
Callable[[DaemonLogMessage],bool]) – A callback which will be executed on each message. If the callback returnsTrue, this method will return as well.timeout – How long to time out after. If the method times out, it will return
Falseinstead ofTrue.
- Returns:
Trueif the condition was satisfied,Falseotherwise.- Return type:
success