ú΢ܛwZ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYportable experimental%John Goerzen <jgoerzen@complete.org>  Safe-Inferred Internal type of log records >Priorities are used to define how important a log message is. 3Users can filter log messages based on priorities. GThese have their roots on the traditional syslog system. The standard Ldefinitions are given below, but you are free to interpret them however you ;like. They are listed here in ascending importance order. System is unusable Take immediate action Severe situations General Errors General Warnings Normal runtime conditions  Information Debug messages     None TA LogFormatter is used to format log messages. Note that it is paramterized on the  HandlerC to allow the formatter to use information specific to the handler 5 (an example of can be seen in the formatter used in  ) =Returns the passed message as is, ie. no formatting is done. CTakes a format string, and returns a formatter that may be used to O format log messages. The format string may contain variables prefixed with O a $-sign which will be replaced at runtime with corresponding values. The & currently supported variables are:  $msg - The actual log message   $loggername - The name of the logger  $prio% - The priority level of the message  $tid - The thread ID  $pid+ - Process ID (Not available on windows)  $time - The current time  $utcTime - The current time in UTC Time Like  8 but allow the time format to be specified in the first  parameter (this is passed to   ) 3An extensible formatter that allows new substition  variables to be defined. G Each variable has an associated IO action that is used to produce the T string to substitute for the variable name. The predefined variables are the same  as for    excluding $time and $utcTime. Z Replace some [, variables in a string with supplied values  2The LogHandler that the passed message came from The log message and priority The logger name The formatted log message ZEA list of (variableName, action to get the replacement string) pairs "String to perform substitution on Resulting string    Zportable provisional%John Goerzen <jgoerzen@complete.org> None)All log handlers should adhere to this. BThis is the base class for the various log handlers. They should all adhere to this class. Sets the log level.  will drop  items beneath this level. Gets the current level. ASet a log formatter to customize the log format for this Handler +Logs an event if it meets the requirements " given by the most recent call to . +Forces an event to be logged regardless of  the configured level. /Closes the logging system, causing it to close  any open files, etc. portable provisional%John Goerzen <jgoerzen@complete.org> NoneA helper data type. ECreate a stream log handler. Log messages sent to this handler will 8 be sent to the stream used initially. Note that the  method F will have no effect on stream handlers; it does not actually close  the underlying stream. >Create a file log handler. Log messages sent to this handler @ will be sent to the filename specified, which will be opened  in Append mode. Calling % on the handler will close the file. Like ., but note the priority and logger name along with each message.  \    \portable provisional%John Goerzen <jgoerzen@complete.org> None! Options for 9. "&Send a copy of each message to stderr #5Automatically log process ID (PID) with each message $>Facilities are used by the system to determine where messages  are sent. ,DLOCAL0 through LOCAL7 are reserved for you to customize as you wish - FTP messages . Private authentication messages /Cron messages 0UUCP messages 1 Usenet news 2Printer messages 3LInternal syslog messages; you should likely never use this in your programs 4$Authentication or security messages 5!Daemon (server process) messages 6E-Mail system 7DGeneral userland messages. Use this if nothing else is appropriate 8CKernel messages; you should likely never use this in your programs 93Initialize the Syslog system using the local system's default interface, /dev/log. Will return a new . On Windows, instead of using /dev/log, this will attempt to send KUDP messages to something listening on the syslog port (514) on localhost. Use ; if you need more control. :DInitialize the Syslog system using an arbitrary Unix socket (FIFO). Not supported under Windows. ;!Log to a remote server via UDP. <DThe most powerful initialization mechanism. Takes an open datagram  socket. +]^_`abcdef!"#$%&'()*+,-./012345678ghi9CThe name of this program -- will be prepended to every log message  A list of !s. The list [] is perfectly valid. [#] is probably most common here. The $= value to pass to the syslog system for every message logged \Messages logged below this priority will be ignored. To include every message, set this to  . Returns the new handler : Path to FIFO  Program name !s Facility value Priority limit ;0Usually AF_INET or AF_INET6; see Network.Socket Remote hostname. Some use  localhost 514 is the default for syslog  Program name !s Facility value Priority limit <A datagram socket Address for transmissions socket connection mode (stream / datagram)  Program name !s Facility value Priority limit jk!"#$%&'()*+,-./0123456789:;<9:;<$876543210/.-,+*)('&%!#" ] ^_`abcdef!#"$876543210/.-,+*)('&%ghi9:;<jkportable provisional0Richard M. Neswold, Jr. <rich.neswold@gmail.com>None=@Creates a Growl handler. Once a Growl handler has been created, E machines that are to receive the message have to be specified. >Adds a remote machine'+s address to the list of targets that will F receive log messages. Calling this function sends a registration E packet to the machine. This function will throw an exception if % the host name cannot be found. lmnopqrstu=The name of the service Priority of handler vwx>yz{=>>= lmnopqrstu=vwx>yz{ GHC only? experimentalbjorn.buckwalter@gmail.comNone?;Create a stream log handler that uses hslogger priorities. @ECreate a stream log handler that uses log4j levels (priorities). The G priorities of messages are shoehorned into log4j levels as follows:   $ DEBUG -> DEBUG # INFO, NOTICE -> INFO # WARNING -> WARN $ ERROR, CRITICAL, ALERT -> ERROR $ EMERGENCY -> FATAL EThis is useful when the log will only be consumed by log4j tools and  you don'At want to go out of your way transforming the log or configuring  the tools. A9Create a file log handler that uses hslogger priorities. B6Create a file log handler that uses log4j levels (see  @ for mappings). |}~?@AB€?@AB?A@B|~}?@AB€portable provisional%John Goerzen <jgoerzen@complete.org> NoneDBThis is the base class for the various log handlers. They should all adhere to this class. AThe name of the root logger, which is always defined and present  on the system. ‚9The log tree. Initialize it with a default root logger + and (FIXME) a logger for MissingH itself. ƒCGiven a name, return all components of it, starting from the root. Example return value: ?["", "MissingH", "System.Cmd.Utils", "System.Cmd.Utils.pOpen"] E;Log a message using the given logger at a given priority. FLog a message at   priority GLog a message at  priority HLog a message at  priority ILog a message at  priority JLog a message at  priority KLog a message at  priority LLog a message at  priority MLog a message at  priority NDReturns the logger for the given name. If no logger with that name D exists, creates new loggers and any necessary parent loggers, with  no connected handlers. OReturns the root logger. P*Log a message, assuming the current logger's level permits it. „Handle a log request. …!Call a handler given a HandlerT. †&Generate IO actions for the handlers. QAdd handler to C. Returns a new C. RSet the  'Logger'\')s list of handlers to the list supplied. * All existing handlers are removed first. S Returns the level$ of the logger. Items beneath this  level will be ignored. T Sets the level of the C. Returns a new  C object with the new level. U Clears the level of the C$. It will now inherit the level of  | its parent. V<Updates the global record for the given logger to take into ( account any changes you may have made. W>Helps you make changes on the given logger. Takes a function ?that makes changes and writes those changes back to the global database. Here's an example from above ("s" is a ): + updateGlobalLogger "MyApp.BuggyComponent" 7 (setLevel DEBUG . setHandlers [s]) X2Allow gracefull shutdown. Release all opened fileshandlersetc. YETraps exceptions that may occur, logging them, then passing them on. KTakes a logger name, priority, leading description text (you can set it to "" if you don' t want any), and action to run. &‡Cˆ‰Š‹ŒD‚ƒEName of the logger to use Priority of this message The log text itself F Logger name  Log message G Logger name  Log message H Logger name  Log message I Logger name  Log message J Logger name  Log message K Logger name  Log message L Logger name  Log message M Logger name  Log message NOP„…†QRSTUVW Logger name Function to call XYŽ  CDEFGHIJKLMNOPQRSTUVWXY C EFGHIJKLMXYPNODQRSTUVW!‡Cˆ‰Š‹ŒD‚ƒEFGHIJKLMNOP„…†QRSTUVWXYŽ‘   !"##$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghhijklmn$%opqrstt$%uvwxyz{|}~€‚ƒ„…†‡ˆ ‰Š‹NŒŽ‘’“hslogger-1.2.3 System.LogSystem.Log.FormatterSystem.Log.HandlerSystem.Log.Handler.SimpleSystem.Log.Handler.SyslogSystem.Log.Handler.GrowlSystem.Log.Handler.Log4jXMLSystem.Log.LoggerSyslogDate.Time.Format formatTime LogRecordPriority EMERGENCYALERTCRITICALERRORWARNINGNOTICEINFODEBUG LogFormatter nullFormattersimpleLogFormattertfLogFormatter varFormatter LogHandlersetLevelgetLevel setFormatter getFormatterhandleemitcloseGenericHandlerpriority formatterprivData writeFunc closeFunc streamHandler fileHandlerverboseStreamHandlerOptionPERRORPIDFacilityLOCAL7LOCAL6LOCAL5LOCAL4LOCAL3LOCAL2LOCAL1LOCAL0FTPAUTHPRIVCRONUUCPNEWSLPRSYSLOGAUTHDAEMONMAILUSERKERNopenlog openlog_localopenlog_remoteopenlog_generic growlHandler addTargetlog4jStreamHandlerlog4jStreamHandler'log4jFileHandlerlog4jFileHandler'LoggerrootLoggerNamelogMdebugMinfoMnoticeMwarningMerrorM criticalMalertM emergencyM getLogger getRootLoggerlogL addHandler setHandlers clearLevelsaveGlobalLoggerupdateGlobalLoggerremoveAllHandlers traplogging replaceVarMbaseGHC.Base$$fLogHandlerGenericHandler SyslogHandleroptionsfacilityidentity logsocketaddress sock_type code_of_pri code_of_facmakeCodesyslogFormatter$fLogHandlerSyslogHandler GrowlHandlerappNameskttargetssendNote nmGeneralMsg nmClosingMsgemit16 emitLen16buildRegistrationtoFlagsbuildNotification$fLogHandlerGrowlHandlerXMLCDATAElem log4jHandlerreplace $fShowXMLlogTreecomponentsOfName callHandlerhandlerActionsLogTreelevelhandlersnameHandlerTsplit breakListspanList