tonatona-logger-0.3.0.0: tonatona plugin for logging.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Tonatona.Logger

Synopsis

Documentation

data Config Source #

Instances

Instances details
HasParser Config Source # 
Instance details

Defined in Tonatona.Logger

Methods

parser :: Parser Config #

data DeployMode Source #

Instances

Instances details
Bounded DeployMode Source # 
Instance details

Defined in Tonatona.Logger

Enum DeployMode Source # 
Instance details

Defined in Tonatona.Logger

Generic DeployMode Source # 
Instance details

Defined in Tonatona.Logger

Associated Types

type Rep DeployMode :: Type -> Type #

Read DeployMode Source # 
Instance details

Defined in Tonatona.Logger

Show DeployMode Source # 
Instance details

Defined in Tonatona.Logger

Var DeployMode Source # 
Instance details

Defined in Tonatona.Logger

Eq DeployMode Source # 
Instance details

Defined in Tonatona.Logger

HasParser DeployMode Source # 
Instance details

Defined in Tonatona.Logger

type Rep DeployMode Source # 
Instance details

Defined in Tonatona.Logger

type Rep DeployMode = D1 ('MetaData "DeployMode" "Tonatona.Logger" "tonatona-logger-0.3.0.0-5C9b3rzJhN6LmlK7prJJ8y" 'False) ((C1 ('MetaCons "Development" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Production" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Staging" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Test" 'PrefixI 'False) (U1 :: Type -> Type)))

newtype Verbose Source #

Constructors

Verbose 

Fields

Instances

Instances details
Read Verbose Source # 
Instance details

Defined in Tonatona.Logger

Show Verbose Source # 
Instance details

Defined in Tonatona.Logger

Eq Verbose Source # 
Instance details

Defined in Tonatona.Logger

Methods

(==) :: Verbose -> Verbose -> Bool #

(/=) :: Verbose -> Verbose -> Bool #

HasParser Verbose Source # 
Instance details

Defined in Tonatona.Logger

defaultVerbosity :: DeployMode -> Verbose -> Bool Source #

Default setting for verbosity.

Standard logging functions

logDebug :: HasConfig env Config => Utf8Builder -> RIO env () Source #

Log a debug level message with no source.

logInfo :: HasConfig env Config => Utf8Builder -> RIO env () Source #

Log an info level message with no source.

logWarn :: HasConfig env Config => Utf8Builder -> RIO env () Source #

Log a warn level message with no source.

logError :: HasConfig env Config => Utf8Builder -> RIO env () Source #

Log an error level message with no source.

logOther Source #

Arguments

:: HasConfig env Config 
=> Text

level

-> Utf8Builder 
-> RIO env () 

Log a message with the specified textual level and no source.

Advanced logging functions

Sticky logging

logSticky :: HasConfig env Config => Utf8Builder -> RIO env () Source #

Write a "sticky" line to the terminal. Any subsequent lines will overwrite this one, and that same line will be repeated below again. In other words, the line sticks at the bottom of the output forever. Running this function again will replace the sticky line with a new sticky line. When you want to get rid of the sticky line, run logStickyDone.

Note that not all LogFunc implementations will support sticky messages as described. However, the withLogFunc implementation provided by this module does.

logStickyDone :: HasConfig env Config => Utf8Builder -> RIO env () Source #

This will print out the given message with a newline and disable any further stickiness of the line until a new call to logSticky happens.

With source

logDebugS :: HasConfig env Config => LogSource -> Utf8Builder -> RIO env () Source #

Log a debug level message with the given source.

logInfoS :: HasConfig env Config => LogSource -> Utf8Builder -> RIO env () Source #

Log an info level message with the given source.

logWarnS :: HasConfig env Config => LogSource -> Utf8Builder -> RIO env () Source #

Log a warn level message with the given source.

logErrorS :: HasConfig env Config => LogSource -> Utf8Builder -> RIO env () Source #

Log an error level message with the given source.

logOtherS Source #

Arguments

:: HasConfig env Config 
=> Text

level

-> LogSource 
-> Utf8Builder 
-> RIO env () 

Log a message with the specified textual level and the given source.

Generic log function

logGeneric :: HasConfig env Config => LogSource -> LogLevel -> Utf8Builder -> RIO env () Source #

Generic, basic function for creating other logging functions.

Data types

data LogLevel #

The log level of a message.

Since: rio-0.0.0.0

Instances

Instances details
Read LogLevel 
Instance details

Defined in RIO.Prelude.Logger

Show LogLevel 
Instance details

Defined in RIO.Prelude.Logger

Eq LogLevel 
Instance details

Defined in RIO.Prelude.Logger

Ord LogLevel 
Instance details

Defined in RIO.Prelude.Logger

type LogSource = Text #

Where in the application a log message came from. Used for display purposes only.

Since: rio-0.0.0.0