Struct syslog_rs::syslog_async::Syslog [−][src]
pub struct Syslog { /* fields omitted */ }
Expand description
A common instance which describes the syslog state
Implementations
Private realization. It is assumed that functions which are called, are called after ‘lock’ is locked. A public implementations
As in a libc, this function initializes the syslog instance. The main difference with realization in C is it returns the instance to program used this crate. This structure implements the Send and Sync so it does not require any additional synchonization.
Arguments
-
ident
- a identification of the sender. If not set, the crate will determine automatically! -
logstat
- sets up the syslog behaviour. Use LogStat -
facility
- a syslog facility. Use LogFacility
Returns
- A SyRes with instance or Err()
Example
Syslog::openlog( Some("test1"), LogStat::LOG_NDELAY | LogStat::LOG_PID, LogFacility::LOG_DAEMON);
Similar to syslog() and created for the compatability.
This function can be used to update the facility name, for example after fork().
Arguments
ident
- a new identity (up to 48 UTF8 chars)