IdrisDoc: Effect.Logging.Category

Effect.Logging.Category

A logging effect that allows messages to be logged using both
numerical levels and user specified categories. The higher the
logging level the grater in verbosity the logging.

In this effect the resource we are computing over is the logging
level itself and the list of categories to show.

warn : Show a => Eq a => List a -> String -> Eff () [LOG a]
trace : Show a => Eq a => List a -> String -> Eff () [LOG a]
setLoglvl : Show a => Eq a => (l : LogLevel n) -> Eff () [LOG a]

Change the logging level.

l

The new logging level.

setLogCats : Show a => Eq a => (cs : List a) -> Eff () [LOG a]

Change the categories to show.

cs

The new categories.

logN : Show a => Eq a => (l : Nat) -> {auto prf : LTE l (fromInteger 70)} -> (cs : List a) -> (m : String) -> Eff () [LOG a]

Log the given message at the given level indicated by a natural number and assign it the list of categories.

l

The logging level.

cs

The logging categories.

m

THe message to be logged.

log : Show a => Eq a => (l : LogLevel n) -> (cs : List a) -> (m : String) -> Eff () [LOG a]

Log the given message at the given level indicated by a natural number and assign it the list of categories.

l

The logging level.

cs

The logging categories.

m

THe message to be logged.

initLogger : Show a => Eq a => (l : LogLevel n) -> (cs : List a) -> Eff () [LOG a]

Initialise the Logger.

l

The logging level.

cs

The categories to show.

info : Show a => Eq a => List a -> String -> Eff () [LOG a]
fatal : Show a => Eq a => List a -> String -> Eff () [LOG a]
error : Show a => Eq a => List a -> String -> Eff () [LOG a]
debug : Show a => Eq a => List a -> String -> Eff () [LOG a]
MkLogRes : (getLevel : LogLevel n) -> (getCategories : List a) -> LogRes a
data Logging : Effect

A Logging effect to log levels and categories.

Log : Show a => Eq a => (lvl : LogLevel n) -> (cats : List a) -> (msg : String) -> sig Logging () (LogRes a)

Log a message.

lvl

The logging level it should appear at.

cats

The categories it should appear under.

msg

The message to log.

SetLogLvl : Show a => Eq a => (nlvl : LogLevel n) -> sig Logging () (LogRes a) (LogRes a)

Change the logging level.

nlvl

The new logging level

SetLogCats : Show a => Eq a => (ncats : List a) -> sig Logging () (LogRes a) (LogRes a)

Change the categories to show.

ncats

The new categories.

InitLogger : Show a => Eq a => (nlvl : LogLevel n) -> (ncats : List a) -> sig Logging () (LogRes a) (LogRes a)

Initialise the logging.

nlvl

The new logging level.

ncats

The categories to show.

record LogRes a

The Logging details, this is the resource that the effect is
defined over.

a
 
MkLogRes : (getLevel : LogLevel n) -> (getCategories : List a) -> LogRes a
getLevel : (rec : LogRes a) -> LogLevel (free_n rec)
getCategories : (rec : LogRes a) -> List a
LOG : (a : Type) -> EFFECT

The Logging effect.

a

The type used to differentiate categories.