unclogging-0.1.0.0: a library which implements easy, concurrent and pretty logging
Safe HaskellNone
LanguageGHC2021

Unclog.Common

Synopsis

Documentation

data LogEntry Source #

the datatype to communicate between a log source and a logging backend

Constructors

MkLogEntry 

Fields

Instances

Instances details
Generic LogEntry Source # 
Instance details

Defined in Unclog.Common

Associated Types

type Rep LogEntry 
Instance details

Defined in Unclog.Common

type Rep LogEntry = D1 ('MetaData "LogEntry" "Unclog.Common" "unclogging-0.1.0.0-inplace" 'False) (C1 ('MetaCons "MkLogEntry" 'PrefixI 'True) ((S1 ('MetaSel ('Just "level") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 LogLevel) :*: S1 ('MetaSel ('Just "timestamp") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Time)) :*: (S1 ('MetaSel ('Just "location") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Location) :*: S1 ('MetaSel ('Just "payload") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 StrictByteString))))

Methods

from :: LogEntry -> Rep LogEntry x #

to :: Rep LogEntry x -> LogEntry #

Show LogEntry Source # 
Instance details

Defined in Unclog.Common

Eq LogEntry Source # 
Instance details

Defined in Unclog.Common

Ord LogEntry Source # 
Instance details

Defined in Unclog.Common

type Rep LogEntry Source # 
Instance details

Defined in Unclog.Common

type Rep LogEntry = D1 ('MetaData "LogEntry" "Unclog.Common" "unclogging-0.1.0.0-inplace" 'False) (C1 ('MetaCons "MkLogEntry" 'PrefixI 'True) ((S1 ('MetaSel ('Just "level") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 LogLevel) :*: S1 ('MetaSel ('Just "timestamp") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Time)) :*: (S1 ('MetaSel ('Just "location") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Location) :*: S1 ('MetaSel ('Just "payload") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 StrictByteString))))

data LogLevel Source #

a loglevel

Constructors

Debug 
Info 
Warn 
Fatal 

Instances

Instances details
Generic LogLevel Source # 
Instance details

Defined in Unclog.Common

Associated Types

type Rep LogLevel 
Instance details

Defined in Unclog.Common

type Rep LogLevel = D1 ('MetaData "LogLevel" "Unclog.Common" "unclogging-0.1.0.0-inplace" 'False) ((C1 ('MetaCons "Debug" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Info" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Warn" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Fatal" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: LogLevel -> Rep LogLevel x #

to :: Rep LogLevel x -> LogLevel #

Show LogLevel Source # 
Instance details

Defined in Unclog.Common

Eq LogLevel Source # 
Instance details

Defined in Unclog.Common

Ord LogLevel Source # 
Instance details

Defined in Unclog.Common

Lift LogLevel Source # 
Instance details

Defined in Unclog.Common

Methods

lift :: Quote m => LogLevel -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => LogLevel -> Code m LogLevel #

type Rep LogLevel Source # 
Instance details

Defined in Unclog.Common

type Rep LogLevel = D1 ('MetaData "LogLevel" "Unclog.Common" "unclogging-0.1.0.0-inplace" 'False) ((C1 ('MetaCons "Debug" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Info" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Warn" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Fatal" 'PrefixI 'False) (U1 :: Type -> Type)))

data Position Source #

a source code position

Constructors

MkPosition 

Fields

Instances

Instances details
Generic Position Source # 
Instance details

Defined in Unclog.Common

Associated Types

type Rep Position 
Instance details

Defined in Unclog.Common

type Rep Position = D1 ('MetaData "Position" "Unclog.Common" "unclogging-0.1.0.0-inplace" 'False) (C1 ('MetaCons "MkPosition" 'PrefixI 'True) (S1 ('MetaSel ('Just "posLeft") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "posRight") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int)))

Methods

from :: Position -> Rep Position x #

to :: Rep Position x -> Position #

Show Position Source # 
Instance details

Defined in Unclog.Common

Eq Position Source # 
Instance details

Defined in Unclog.Common

Ord Position Source # 
Instance details

Defined in Unclog.Common

Lift Position Source # 
Instance details

Defined in Unclog.Common

Methods

lift :: Quote m => Position -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Position -> Code m Position #

type Rep Position Source # 
Instance details

Defined in Unclog.Common

type Rep Position = D1 ('MetaData "Position" "Unclog.Common" "unclogging-0.1.0.0-inplace" 'False) (C1 ('MetaCons "MkPosition" 'PrefixI 'True) (S1 ('MetaSel ('Just "posLeft") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "posRight") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int)))

data Location Source #

the code location at which the log entry was generated

Constructors

MkLocation 

Fields

  • locpkg :: !Text

    the package in which the log entry was generated

  • locmod :: !Text

    the module in which the log entry was generated

  • locpos :: !Position

    the position at which the log entry was generated

Instances

Instances details
Generic Location Source # 
Instance details

Defined in Unclog.Common

Associated Types

type Rep Location 
Instance details

Defined in Unclog.Common

type Rep Location = D1 ('MetaData "Location" "Unclog.Common" "unclogging-0.1.0.0-inplace" 'False) (C1 ('MetaCons "MkLocation" 'PrefixI 'True) (S1 ('MetaSel ('Just "locpkg") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "locmod") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "locpos") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Position))))

Methods

from :: Location -> Rep Location x #

to :: Rep Location x -> Location #

Show Location Source # 
Instance details

Defined in Unclog.Common

Eq Location Source # 
Instance details

Defined in Unclog.Common

Ord Location Source # 
Instance details

Defined in Unclog.Common

Lift Location Source # 
Instance details

Defined in Unclog.Common

Methods

lift :: Quote m => Location -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Location -> Code m Location #

type Rep Location Source # 
Instance details

Defined in Unclog.Common

type Rep Location = D1 ('MetaData "Location" "Unclog.Common" "unclogging-0.1.0.0-inplace" 'False) (C1 ('MetaCons "MkLocation" 'PrefixI 'True) (S1 ('MetaSel ('Just "locpkg") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "locmod") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "locpos") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Position))))

newtype PLogChan Source #

a publish channel with multiple writers

Constructors

MkPLogChan 

Instances

Instances details
Eq PLogChan Source # 
Instance details

Defined in Unclog.Common

newtype SLogChan Source #

a read channel created from a publis

Constructors

MkSLogChan 

Instances

Instances details
Eq SLogChan Source # 
Instance details

Defined in Unclog.Common