Crate log4rs_syslog [] [src]

Very simple syslog appender for the log4rs based on the libc's syslog() function. Supports only *nix systems.

Source code and examples: https://github.com/im-0/log4rs-syslog

Structs

LogOption

Syslog option flags.

SyslogAppender

An appender which writes log invents into syslog using libc's syslog() function.

SyslogAppenderBuilder

Builder for SyslogAppender.

Enums

Facility

The type of program.

Constants

LOG_CONS

Write directly to system console if there is an error while sending to system logger.

LOG_NDELAY

Open the connection immediately (normally, the connection is opened when the first message is logged).

LOG_NOWAIT

Don't wait for child processes that may have been created while logging the message. The GNU C library does not create a child process, so this option has no effect on Linux.

LOG_ODELAY

The converse of LOG_NDELAY; opening of the connection is delayed until syslog() is called. This is the default, and need not be specified.

LOG_PERROR

Print to stderr as well. (Not in POSIX.1-2001 or POSIX.1-2008.)

LOG_PID

Include PID with each message.

Functions

register_deserializer

Register deserializer for creating syslog appender based on log4rs configuration file.

Type Definitions

LevelMap

Function for mapping rust's log levels to libc's log levels.