Skip to main content

Module log

Module log 

Source
Expand description

Log sinks: syslog, a file, or stderr.

Lines written to a file or to stderr keep autossh’s format, %Y/%m/%d %H:%M:%S rash[pid]: message (autossh.c:1783-1819), so anything already parsing autossh logs keeps working.

The syslog call is always syslog(level, "%s", msg). autossh’s fallback path passes the message as the format string (autossh.c:1797), which misbehaves on any log line containing a %.

Functions§

emit
Emit one line, if the configured verbosity allows it.
init
Set up the process-wide sink. Call once, and only after any daemonising fork.