úÎ|ÖyC      !"#$%&'()*+,-./0123456789:;<=>?@ABsimons@cryp.to provisionalPOSIXSafe5 >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] :: PriorityDebugthe system is unusable action must be taken immediatelycritical conditionserror conditionswarning conditions normal but significant condition informationaldebug-level messages  Translate a : into the system-dependent identifier that's used by the  syslog(3) implementation.     simons@cryp.to provisionalPOSIXSafe5 The function openlog\ allows one to configure a handful of process-wide options that modify the bahavior of the syslog funcion. These options are pid, cons, odelay, and ndelay.Log the pid with each message.:Log on the console if errors occur while sending messages.%Delay all initialization until first syslog() call (default).(Initalize the syslog system immediately.‰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. Translate an : into the system-dependent identifier that's used by the  syslog(3) implementation.simons@cryp.to provisionalPOSIXNone The 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.The POSIX function  Ihttp://pubs.opengroup.org/onlinepubs/9699919799/functions/setlogmask.html setlogmask(3)F imported into Haskell directly as an "unsafe" foreign function call. The POSIX function  Ghttp://pubs.opengroup.org/onlinepubs/9699919799/functions/closelog.html closelog(3)F imported into Haskell directly as an "unsafe" foreign function call.!The POSIX function  Fhttp://pubs.opengroup.org/onlinepubs/9699919799/functions/openlog.html openlog(3)G, imported into Haskell directly as an "unsafe" foreign function call."The 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 .OA bit mask that determines which priorities are enabled or disabled. See also  _LOG_MASK. !cA 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. A bit set that combines various Option values. A default Facility- to use for messages that don't specify one."#The system-specific identifier for .#The system-specific identifier for  .}The actual log message, which does not need to be terminated by a NUL byte. It should not contain NUL bytes either, though.ÿ 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 provisionalPOSIXNone#hConvert a set of logging priorities into a system-dependent binary representation suitable for calling  _setlogmask.$CDecode the the system-dependent binary representation returned by  _setlogmask' back into a set of logging priorities.#$#$#$#$simons@cryp.to provisionalPOSIXSafe5%QSyslog distinguishes various system facilities. Most applications should log in USER.&kernel messages'2user-level messages (default unless set otherwise)( mail system)network news subsystem*UUCP subsystem+system daemons,#security and authorization messages- clock daemon.line printer subsystem/reserved for local use0reserved for local use1reserved for local use2reserved for local use3reserved for local use4reserved for local use5reserved for local use6reserved for local use7 Translate a %: into the system-dependent identifier that's used by the  syslog(3) implementation.%&'()*+,-./01234567%&'()*+,-./01234567%&'()*+,-./01234567%&'()*+,-./01234567simons@cryp.to provisionalPOSIXNone>Log 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!).?¹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.@%Release all syslog-related resources.ARun 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 BzConfigure 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.>–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. Log with the specified priority.HThe 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.?ÌAn identifier to prepend to all log messages, typically the name of the programm. Note that the memory that contains this name must remain valid until the pointer provided here is released by calling @.LA set of options that configure the behavior of the system's syslog engine.DThe facility to use by default when none has been specified with a > call.@AB&%&'()*+,-./0123456>?@AB&>%&'()*+,-./0123456?@AB>?@ABI      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOMPQMPRMPSMTUV hsyslog-5-L1ZI5LBBhsz9jTl05jKWrdSystem.Posix.Syslog.PrioritySystem.Posix.Syslog.OptionsSystem.Posix.Syslog.FunctionsSystem.Posix.Syslog.LogMaskSystem.Posix.Syslog.FacilitySystem.Posix.SyslogsyslogFacilityPriority EmergencyAlertCriticalErrorWarningNoticeInfoDebug fromPriority$fShowPriority$fReadPriority $fEqPriority $fOrdPriority$fBoundedPriority$fEnumPriority$fGenericPriorityOptionLogPIDConsole DelayedOpen ImmediateOpenDontWaitForChildren fromOption $fShowOption $fReadOption$fBoundedOption $fEnumOption $fEqOption$fGenericOption_logMask _setlogmask _closelog_openlog_syslog toLogMask fromLogMaskKernelUserMailNewsUUCPDaemonAuthCronLPRLocal0Local1Local2Local3Local4Local5Local6Local7 fromFacility$fShowFacility$fReadFacility$fBoundedFacility$fEnumFacility $fEqFacility$fGenericFacilityopenlogcloselog withSyslog setlogmaskghc-prim GHC.ClassesOrdbaseGHC.BaseStringForeign.C.StringwithCStringLen CStringLen withCStringControl.Exception.Basebracket_