log4hs-0.9.0.0: A python logging style log library

Safe HaskellNone
LanguageHaskell2010

Logging.Record

Synopsis

Documentation

data LogRecord Source #

A LogRecord represents an event being logged.

LogRecords are created every time something is logged. They contain all the information related to the event being logged.

It includes the main message as well as information such as when the record was created, the source line where the logging call was made.

LogRecord can be formatted into string by Format from vformat package, see format1 for more information.

Currently, the useful attributes in a LogRecord are described by:

 logger        name of the logger, see Logger
 level         logging level for the message, see Level
 message       the main message passed to logv debug info ..
 pathname      full pathname of the source file where the logging call was issued (if available)
 filename      filename portion of pathname
 pkgname       package name where the logging call was issued (if available)
 modulename    module name (e.g. Main, Logging)
 lineno        source line number where the logging call was issued (if available)
 asctime       locale time when the LogRecord was created (TimeZone is from Manager)
 utctime       utc time when the LogRecord was created
 created       timestamp when the LogRecord was created
 msecs         millisecond portion of the creation time
 thread        ThreadId of the thread in which the logging call was issued

Format examples:

 "{message}"
 "{logger} {level}: {message}"
 "{logger:<20.20s} {level:<8s}: {message}"
 "{asctime:%Y-%m-%dT%H:%M:%S%6Q%z} - {level} - {logger}] {message}"

Constructors

LogRecord 

Fields

Instances
Show LogRecord Source # 
Instance details

Defined in Logging.Record

Generic LogRecord Source # 
Instance details

Defined in Logging.Record

Associated Types

type Rep LogRecord :: Type -> Type #

FormatArg LogRecord Source # 
Instance details

Defined in Logging.Record

type Rep LogRecord Source # 
Instance details

Defined in Logging.Record

type Rep LogRecord = D1 (MetaData "LogRecord" "Logging.Record" "log4hs-0.9.0.0-4PM0R38s3Ze40Yc5B0pDHZ" False) (C1 (MetaCons "LogRecord" PrefixI True) (((S1 (MetaSel (Just "logger") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Logger) :*: (S1 (MetaSel (Just "level") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Level) :*: S1 (MetaSel (Just "message") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) :*: ((S1 (MetaSel (Just "pathname") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "filename") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :*: (S1 (MetaSel (Just "pkgname") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "modulename") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))) :*: ((S1 (MetaSel (Just "lineno") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: (S1 (MetaSel (Just "asctime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ZonedTime) :*: S1 (MetaSel (Just "utctime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime))) :*: ((S1 (MetaSel (Just "created") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double) :*: S1 (MetaSel (Just "msecs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer)) :*: (S1 (MetaSel (Just "thread") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ThreadId) :*: S1 (MetaSel (Just "context") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Value))))))