\      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[$Copyright (C) 2004-2011 John GoerzenBSD3%John Goerzen <jgoerzen@complete.org>  experimentalportableSafe;N Internal type of log records pPriorities are used to define how important a log message is. Users can filter log messages based on priorities.These have their roots on the traditional syslog system. The standard definitions are given below, but you are free to interpret them however you like. They are listed here in ascending importance order.Debug messages InformationNormal runtime conditionsGeneral WarningsGeneral ErrorsSevere situationsTake immediate action System is unusable     Safe;N UA LogFormatter is used to format log messages. Note that it is paramterized on the Handlerx to allow the formatter to use information specific to the handler (an example of can be seen in the formatter used in  ) <Returns the passed message as is, ie. no formatting is done. Takes a format string, and returns a formatter that may be used to format log messages. The format string may contain variables prefixed with 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  V 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. Each variable has an associated IO action that is used to produce the string to substitute for the variable name. The predefined variables are the same as for    excluding $time and $utcTime.\ Replace some ]+ variables in a string with supplied values 1The LogHandler that the passed message came from The log message and priorityThe logger nameThe formatted log message \DA list of (variableName, action to get the replacement string) pairs!String to perform substitution onResulting string   \$Copyright (C) 2004-2011 John GoerzenBSD3%John Goerzen <jgoerzen@complete.org>  provisionalportableSafe;N(All log handlers should adhere to this. \This 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.@Set a log formatter to customize the log format for this HandlerMLogs an event if it meets the requirements given by the most recent call to .AForces an event to be logged regardless of the configured level.DCloses the logging system, causing it to close any open files, etc.$Copyright (C) 2004-2011 John GoerzenBSD3%John Goerzen <jgoerzen@complete.org>  provisionalportableSafe;NA helper data type. }Create a stream log handler. Log messages sent to this handler will be sent to the stream used initially. Note that the i method 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 A, but note the priority and logger name along with each message.  ^    ^$Copyright (C) 2004-2011 John GoerzenBSD3%John Goerzen <jgoerzen@complete.org>  provisionalportableNone;N" Options for :. #4Automatically log process ID (PID) with each message$%Send a copy of each message to stderr%HFacilities are used by the system to determine where messages are sent. &BKernel messages; you should likely never use this in your programs'CGeneral userland messages. Use this if nothing else is appropriate( E-Mail system) Daemon (server process) messages*#Authentication or security messages+KInternal syslog messages; you should likely never use this in your programs,Printer messages- Usenet news. UUCP messages/ Cron messages0Private authentication messages1 FTP messages2CLOCAL0 through LOCAL7 are reserved for you to customize as you wish:fInitialize 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 UDP messages to something listening on the syslog port (514) on localhost.Use < if you need more control.;CInitialize the Syslog system using an arbitrary Unix socket (FIFO).Not supported under Windows.< Log to a remote server via UDP. =LThe most powerful initialization mechanism. Takes an open datagram socket. +!_`abcdefg"#$%&'()*+,-./0123456789hij:BThe 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"sFacility valuePriority limit</Usually AF_INET or AF_INET6; see Network.SocketRemote hostname. Some use  localhost514 is the default for syslog Program name"sFacility valuePriority limit=A datagram socketAddress for transmissions*socket connection mode (stream / datagram) Program name"sFacility valuePriority limitkl!"#$%&'()*+,-./0123456789:;<=!:;<=%&'()*+,-./0123456789"#$ ! _`abcdefg"#$%&'()*+,-./0123456789hij:;<=kl<Copyright (C) 2007-2011 John Goerzen <jgoerzen@complete.org>BSD30Richard M. Neswold, Jr. <rich.neswold@gmail.com> provisionalportableNone;N>Creates a Growl handler. Once a Growl handler has been created, machines that are to receive the message have to be specified. ?Adds a remote machine's address to the list of targets that will receive log messages. Calling this function sends a registration packet to the machine. This function will throw an exception if the host name cannot be found. mnopqrstuv>The name of the servicePriority of handlerwxy?z{|>??> mnopqrstuv>wxy?z{|$Copyright (C) 2007-2011 John GoerzenBSD3bjorn.buckwalter@gmail.com experimental GHC only?Safe;N@:Create a stream log handler that uses hslogger priorities.ACreate a stream log handler that uses log4j levels (priorities). The priorities of messages are shoehorned into log4j levels as follows:  DEBUG -> DEBUG INFO, NOTICE -> INFO WARNING -> WARN ERROR, CRITICAL, ALERT -> ERROR EMERGENCY -> FATAL This is useful when the log will only be consumed by log4j tools and you don't want to go out of your way transforming the log or configuring the tools. B8Create a file log handler that uses hslogger priorities.C9Create a file log handler that uses log4j levels (see A for mappings). }~@ABC@ABC@BAC}~@ABC$Copyright (C) 2004-2011 John GoerzenBSD3%John Goerzen <jgoerzen@complete.org>  provisionalportableNone;NE\This is the base class for the various log handlers. They should all adhere to this class. PThe name of the root logger, which is always defined and present on the system.cThe log tree. Initialize it with a default root logger and (FIXME) a logger for MissingH itself.YGiven a name, return all components of it, starting from the root. Example return value: >["", "MissingH", "System.Cmd.Utils", "System.Cmd.Utils.pOpen"]F:Log a message using the given logger at a given 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 NLog a message at   priority OReturns the logger for the given name. If no logger with that name exists, creates new loggers and any necessary parent loggers, with no connected handlers.PReturns the root logger.Q>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.RAdd handler to D. Returns a new D.SRemove a handler from the Dg. Handlers are removed in the reverse order they were added, so the following property holds for any  h: !removeHandler . addHandler h = id'If no handlers are associated with the D, it is returned unchanged.The root logger's default handler that writes every message to stderr can be removed by using this function before any handlers have been added to the root logger: /updateGlobalLogger rootLoggerName removeHandlerTSet the  'Logger'\'Rs list of handlers to the list supplied. All existing handlers are removed first.UNReturns the "level" of the logger. Items beneath this level will be ignored.VSets the "level" of the D. Returns a new D object with the new level.WClears the "level" of the D2. It will now inherit the level of | its parent.XcUpdates the global record for the given logger to take into account any changes you may have made.YHelps 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" (setLevel DEBUG . setHandlers [s])Z2Allow gracefull shutdown. Release all opened fileshandlersetc.[DTraps 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.'DEFName of the logger to usePriority of this messageThe log text itselfG Logger name Log messageH Logger name Log messageI Logger name Log messageJ Logger name Log messageK Logger name Log messageL Logger name Log messageM Logger name Log messageN Logger name Log messageOPQRSTUVWXY Logger nameFunction to callZ[! DEFGHIJKLMNOPQRSTUVWXYZ[!D FGHIJKLMNZ[QOPERSTUVWXY"DEFGHIJKLMNOPQRSTUVWXYZ[   !"##$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi,jklmno$%pqrstuu$%vwxyz{|}~ Ohslog_7S2R9oN6Jiq9ujVQkRIVGN System.LogSystem.Log.FormatterSystem.Log.HandlerSystem.Log.Handler.SimpleSystem.Log.Handler.SyslogSystem.Log.Handler.GrowlSystem.Log.Handler.Log4jXMLSystem.Log.LoggerSyslogDate.Time.Format formatTime LogRecordPriorityDEBUGINFONOTICEWARNINGERRORCRITICALALERT EMERGENCY LogFormatter nullFormattersimpleLogFormattertfLogFormatter varFormatter LogHandlersetLevelgetLevel setFormatter getFormatterhandleemitcloseGenericHandlerpriority formatterprivData writeFunc closeFunc streamHandler fileHandlerverboseStreamHandler SyslogHandlerOptionPIDPERRORFacilityKERNUSERMAILDAEMONAUTHSYSLOGLPRNEWSUUCPCRONAUTHPRIVFTPLOCAL0LOCAL1LOCAL2LOCAL3LOCAL4LOCAL5LOCAL6LOCAL7openlog openlog_localopenlog_remoteopenlog_generic growlHandler addTargetlog4jStreamHandlerlog4jStreamHandler'log4jFileHandlerlog4jFileHandler'LoggerrootLoggerNamelogMdebugMinfoMnoticeMwarningMerrorM criticalMalertM emergencyM getLogger getRootLoggerlogL addHandler removeHandler setHandlers clearLevelsaveGlobalLoggerupdateGlobalLoggerremoveAllHandlers traplogging replaceVarMbaseGHC.Base$$fLogHandlerGenericHandleroptionsfacilityidentity logsocketaddress sock_type code_of_pri code_of_facmakeCodesyslogFormatter$fLogHandlerSyslogHandler GrowlHandlerappNameskttargetssendNote nmGeneralMsg nmClosingMsgemit16 emitLen16buildRegistrationtoFlagsbuildNotification$fLogHandlerGrowlHandlerXMLElemCDATA log4jHandlerreplace $fShowXMLlogTreecomponentsOfName callHandlerhandlerActionsLogTreelevelhandlersnameHandlerTsplit breakListspanList