úÎ!ƒC      !"#$%&'()*+,-./0123456789:;<=>?@ABsimons@cryp.to provisionalPOSIXSafe7µhsyslogQSyslog distinguishes various system facilities. Most applications should log in USER.hsyslogkernel messageshsyslog2user-level messages (default unless set otherwise)hsyslog mail systemhsyslognetwork news subsystemhsyslogUUCP subsystemhsyslogsystem daemonshsyslog#security and authorization messageshsyslog clock daemon hsyslogline printer subsystem hsyslogreserved for local use hsyslogreserved for local use hsyslogreserved for local use hsyslogreserved for local usehsyslogreserved for local usehsyslogreserved for local usehsyslogreserved for local usehsyslogreserved for local usehsyslog Translate a : into the system-dependent identifier that's used by the  syslog(3) implementation.  simons@cryp.to provisionalPOSIXNone5ØhsyslogThe POSIX macro  Ehttp://pubs.opengroup.org/onlinepubs/009695399/basedefs/syslog.h.html LOG_MASK()¢ imported into Haskell directly as a pure, "unsafe" foreign function call. It does feel a little silly to bother with this functions since we pretty much know  _logMask = (2^) u for certain, but, well, POSIX provides this abstraction and so it's probably no good idea to make that assumption.hsyslogThe POSIX function  Ihttp://pubs.opengroup.org/onlinepubs/9699919799/functions/setlogmask.html setlogmask(3)F imported into Haskell directly as an "unsafe" foreign function call.hsyslogThe POSIX function  Ghttp://pubs.opengroup.org/onlinepubs/9699919799/functions/closelog.html closelog(3)F imported into Haskell directly as an "unsafe" foreign function call.hsyslogThe POSIX function  Fhttp://pubs.opengroup.org/onlinepubs/9699919799/functions/openlog.html openlog(3)G, imported into Haskell directly as an "unsafe" foreign function call.hsyslogThe POSIX function  Ehttp://pubs.opengroup.org/onlinepubs/9699919799/functions/syslog.html syslog(3)Ý imported into Haskell directly as an "unsafe" C-API call. We chose this specific signature for the variadic function, because it's ideal for the efficient zero-copy implementation provided by the high-level function .hsyslogOA bit mask that determines which priorities are enabled or disabled. See also  _LOG_MASK.hsyslogcA process-wide identifier to prepent to every log message. Note that this string must exist until closelogN is called. If the underlying memory buffer changes, the identifier used by  probably! changes too. It's safe to pass nullPtr>, but POSIX does not specify how that choice is interpreted.hsyslog A bit set that combines various Option values.hsyslog A default Facility- to use for messages that don't specify one.hsyslog#The system-specific identifier for .hsyslog#The system-specific identifier for  .hsyslog}The actual log message, which does not need to be terminated by a NUL byte. It should not contain NUL bytes either, though.hsyslogÿ The length of the log message. Yes, this is a signed integer. Yes, an unsigned integer would be better. No, I can't do anything about it. It's frickin' C code from one and a half centuries ago; what do you expect? Just don't pass any negative values here, okay?simons@cryp.to provisionalPOSIXSafe7A»hsyslog The function openlog\ allows one to configure a handful of process-wide options that modify the behavior of the syslog function. These options are pid, cons, odelay, and ndelay.hsyslogLog the pid with each message. hsyslog:Log on the console if errors occur while sending messages.!hsyslog%Delay all initialization until first syslog() call (default)."hsyslog)Initialize the syslog system immediately.#hsyslog‰The syslog system should not attempt to wait for child process it may have created. This option is required by applications who enable SIGCHLD themselves.$hsyslog Translate an : into the system-dependent identifier that's used by the  syslog(3) implementation.#"! $#"! $simons@cryp.to provisionalPOSIXSafe7N +hsyslog>Log messages are prioritized with one of the following levels:"[minBound..maxBound] :: [Priority]:[Emergency,Alert,Critical,Error,Warning,Notice,Info,Debug]The C instance for +> considers the more urgent level lower than less urgent ones:Emergency < DebugTrue(minimum [minBound..maxBound] :: Priority Emergency(maximum [minBound..maxBound] :: PriorityDebug,hsyslogthe system is unusable-hsyslog action must be taken immediately.hsyslogcritical conditions/hsyslogerror conditions0hsyslogwarning conditions1hsyslog normal but significant condition2hsyslog informational3hsyslogdebug-level messages4hsyslog Translate a +: into the system-dependent identifier that's used by the  syslog(3) implementation. +210/.-,34 +210/.-,34simons@cryp.to provisionalPOSIXNoneRÿ<hsysloghConvert a set of logging priorities into a system-dependent binary representation suitable for calling  _setlogmask.=hsyslogCDecode the the system-dependent binary representation returned by  _setlogmask' back into a set of logging priorities.<=<=simons@cryp.to provisionalPOSIXNone}Ý>hsyslogLog the given text message via  syslog(3):. Please note that log messages are committed to the log verbatim --- printf()O-style text formatting features offered by the underlying system function are not' available. If your log message reads "%s"b, then that string is exactly what will be written to the log. Also, log messages cannot contain \0€ bytes. If they do, all content following that byte will be cut off because the C function assumes that the string ends there. The Haskell D type can be easily logged with E: : withCStringLen "Hello, world." $ syslog (Just User) Info  ByteStrings( can be logged in the same way with the unsafeUseAsCStringLen function from Data.ByteString.Unsafe, which extracts a F from the  ByteString in constant time (no copying!).?hsyslog¹This function configures the process-wide hidden state of the system's syslog engine. It's probably a bad idea to call this function anywhere except at the very top of your program's main5 function. And even then you should probably prefer AQ instead, which guarantees that syslog is properly initialized within its scope.@hsyslog%Release all syslog-related resources.AhsyslogRun the given IO aH computation within an initialized syslogging scope. The definition is: & withSyslog ident opts facil f = G ident $ ptr -> H% (openlog ptr opts facil) closelog f BhsyslogzConfigure a process-wide filter that determines which logging priorities are ignored and which ones are forwarded to the syslog# implementation. For example, use setlogmask [Emergency .. Info]J to filter out all debug-level messages from the message stream. Calling setlogmask [minBound..maxBound] enables  everything. The special case  setlogmask [] does nothingr, i.e. the current filter configuration is not modified. This can be used to retrieve the current configuration.>hsyslog–Categorize this message as belonging into the given system facility. If left unspecified, the process-wide default will be used, which tends to be  by default.hsyslog Log with the specified priority.hsyslogHThe actual log message. The string does not need to be terminated by a \0 byte. If the string does contain a \0P byte, then the message ends there regardless of what the length argument says.?hsyslogËAn identifier to prepend to all log messages, typically the name of the program. Note that the memory that contains this name must remain valid until the pointer provided here is released by calling @.hsyslogLA set of options that configure the behavior of the system's syslog engine.hsyslogDThe facility to use by default when none has been specified with a > call.&  !"#+3,-./012>?@AB&>+3,-./012 ?@AB !"#I     !"#$%&'()*+,-./0123 456789:;<=>?@ABCDEFGHIJKLMNOMPQMPRMPSMTUV$hsyslog-5.0.2-4YPEwpeEGKZ6PP1UUUwS4gSystem.Posix.Syslog.FacilitySystem.Posix.Syslog.FunctionsSystem.Posix.Syslog.OptionsSystem.Posix.Syslog.PrioritySystem.Posix.Syslog.LogMaskSystem.Posix.SyslogsyslogFacilityPriorityKernelUserMailNewsUUCPDaemonAuthCronLPRLocal0Local1Local2Local3Local4Local5Local6Local7 fromFacility$fShowFacility$fReadFacility$fBoundedFacility$fEnumFacility $fEqFacility$fGenericFacility_logMask _setlogmask _closelog_openlog_syslogOptionLogPIDConsole DelayedOpen ImmediateOpenDontWaitForChildren fromOption $fShowOption $fReadOption$fBoundedOption $fEnumOption $fEqOption$fGenericOption EmergencyAlertCriticalErrorWarningNoticeInfoDebug fromPriority$fShowPriority$fReadPriority $fEqPriority $fOrdPriority$fBoundedPriority$fEnumPriority$fGenericPriority toLogMask fromLogMaskopenlogcloselog withSyslog setlogmaskghc-prim GHC.ClassesOrdbaseGHC.BaseStringForeign.C.StringwithCStringLen CStringLen withCStringControl.Exception.Basebracket_