Function base::syslog::init_with

source ·
pub fn init_with(cfg: LogConfig) -> Result<(), Error>
Expand description

Initialize the syslog connection and internal variables.

This should only be called once per process before any other threads have been spawned or any signal handlers have been registered. Every call made after the first will panic.

Arguments:

  • filter: See https://docs.rs/env_logger/0.9/env_logger/index.html for example filter specifications
  • stderr: If set will output to stderr (in addition)
  • file: If set will output to this file (in addition)
  • proc_name: proc name for Syslog implementation
  • syslog_facility: syslog facility
  • file_formatter: custom formatter for file output. See env_logger docs