napkin-spec-2.0.0
Safe HaskellNone
LanguageGHC2024

Napkin.Logging

Synopsis

Documentation

data LogLineFormat #

Constructors

Simple

for interactive terminal

Server

for cron jobs

Json 

data LogOptions #

Instances

Instances details
Generic LogOptions # 
Instance details

Defined in Napkin.Logging

Associated Types

type Rep LogOptions 
Instance details

Defined in Napkin.Logging

type Rep LogOptions = D1 ('MetaData "LogOptions" "Napkin.Logging" "napkin-spec-2.0.0-7NH5JHRFo7V8BQP5NCfMo1" 'False) (C1 ('MetaCons "LogOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "severity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Severity) :*: (S1 ('MetaSel ('Just "lineFormat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LogLineFormat) :*: S1 ('MetaSel ('Just "logTarget") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LogTarget]))))
Show LogOptions # 
Instance details

Defined in Napkin.Logging

Eq LogOptions # 
Instance details

Defined in Napkin.Logging

type Rep LogOptions # 
Instance details

Defined in Napkin.Logging

type Rep LogOptions = D1 ('MetaData "LogOptions" "Napkin.Logging" "napkin-spec-2.0.0-7NH5JHRFo7V8BQP5NCfMo1" 'False) (C1 ('MetaCons "LogOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "severity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Severity) :*: (S1 ('MetaSel ('Just "lineFormat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LogLineFormat) :*: S1 ('MetaSel ('Just "logTarget") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LogTarget]))))

data LogTarget #

Constructors

Console 
File FilePath 

Instances

Instances details
Generic LogTarget # 
Instance details

Defined in Napkin.Logging

Associated Types

type Rep LogTarget 
Instance details

Defined in Napkin.Logging

type Rep LogTarget = D1 ('MetaData "LogTarget" "Napkin.Logging" "napkin-spec-2.0.0-7NH5JHRFo7V8BQP5NCfMo1" 'False) (C1 ('MetaCons "Console" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "File" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))
Show LogTarget # 
Instance details

Defined in Napkin.Logging

Eq LogTarget # 
Instance details

Defined in Napkin.Logging

type Rep LogTarget # 
Instance details

Defined in Napkin.Logging

type Rep LogTarget = D1 ('MetaData "LogTarget" "Napkin.Logging" "napkin-spec-2.0.0-7NH5JHRFo7V8BQP5NCfMo1" 'False) (C1 ('MetaCons "Console" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "File" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))

simpleFormat :: LogItem a => ItemFormatter a #

Simplified version of the bracketed log format. Only timestamp and debug level are bracketed. For example:

[2022-01-04 16:39:21][Debug] Starting interpreter
[2022-01-04 16:39:23][Debug] Interpreter start performed in 2.09s

timeLog :: Katip m => String -> m b -> m b #

echo :: Katip m => Severity -> LogStr -> m () #

echo' :: (Katip m, LogItem a) => a -> Severity -> LogStr -> m () #

Orphan instances

FromBuilder LogStr # 
Instance details