Function syslog::init [] [src]

pub fn init(
    facility: Facility,
    log_level: LogLevelFilter,
    application_name: Option<&str>
) -> Result<(), SyslogError>

Initializes logging subsystem for log crate

This tries to connect to syslog by following ways:

  1. Unix sockets /dev/log and /var/run/syslog (in this order)
  2. Tcp connection to 127.0.0.1:601
  3. Udp connection to 127.0.0.1:514

Note the last option usually (almost) never fails in this method. So this method doesn't return error even if there is no syslog.

If application_name is None name is derived from executable name