shrun-0.9: A utility program for running shell commands concurrently.
Safe HaskellNone
LanguageGHC2021

Shrun.Logging.Types

Description

This module provides the Log type and associated functions.

Synopsis

Basic Types

data Log Source #

Captures the relevant information concerning a specific log (i.e. command, text, level, and mode).

Constructors

MkLog 

Fields

Instances

Instances details
Show Log Source # 
Instance details

Defined in Shrun.Logging.Types

Methods

showsPrec :: Int -> Log -> ShowS #

show :: Log -> String #

showList :: [Log] -> ShowS #

(k ~ A_Lens, a ~ Maybe CommandP1, b ~ Maybe CommandP1) => LabelOptic "cmd" k Log Log a b Source # 
Instance details

Defined in Shrun.Logging.Types

Methods

labelOptic :: Optic k NoIx Log Log a b Source #

(k ~ A_Lens, a ~ LogLevel, b ~ LogLevel) => LabelOptic "lvl" k Log Log a b Source # 
Instance details

Defined in Shrun.Logging.Types

Methods

labelOptic :: Optic k NoIx Log Log a b Source #

(k ~ A_Lens, a ~ LogMode, b ~ LogMode) => LabelOptic "mode" k Log Log a b Source # 
Instance details

Defined in Shrun.Logging.Types

Methods

labelOptic :: Optic k NoIx Log Log a b Source #

(k ~ A_Lens, a ~ UnlinedText, b ~ UnlinedText) => LabelOptic "msg" k Log Log a b Source # 
Instance details

Defined in Shrun.Logging.Types

Methods

labelOptic :: Optic k NoIx Log Log a b Source #

data LogMode Source #

Determines the logging behavior. This option only affects console logs; File logs are unaffected.

Constructors

LogModeSet

Sets the logging region to this log.

LogModeAppend

Appends the log to the logging region.

LogModeFinish

Closes the logging region, finishing with the log.

data LogLevel Source #

Determines the logging level.

Instances

Instances details
Bounded LogLevel Source # 
Instance details

Defined in Shrun.Logging.Types

Enum LogLevel Source # 
Instance details

Defined in Shrun.Logging.Types

Show LogLevel Source # 
Instance details

Defined in Shrun.Logging.Types

Eq LogLevel Source # 
Instance details

Defined in Shrun.Logging.Types

Console Logs

data ConsoleLog Source #

ConsoleLog is a textual representation of a given log after it has been formatted.

Instances

Instances details
Show ConsoleLog Source # 
Instance details

Defined in Shrun.Logging.Types.Internal

Eq ConsoleLog Source # 
Instance details

Defined in Shrun.Logging.Types.Internal

(k ~ A_Getter, a ~ Text, b ~ Text) => LabelOptic "unConsoleLog" k ConsoleLog ConsoleLog a b Source # 
Instance details

Defined in Shrun.Logging.Types.Internal

data LogRegion r Source #

ConsoleLog with possible region.

Constructors

LogRegion LogMode r ConsoleLog

Log with region.

LogNoRegion ConsoleLog

Log without region.

File Logs

data FileLog Source #

FileLog is a textual representation of a given log after it has been formatted. No coloring is included, but we include the prefix (e.g. Warn) along with a timestamp.

Instances

Instances details
Show FileLog Source # 
Instance details

Defined in Shrun.Logging.Types.Internal

Eq FileLog Source # 
Instance details

Defined in Shrun.Logging.Types.Internal

Methods

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

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

(k ~ A_Getter, a ~ Text, b ~ Text) => LabelOptic "unFileLog" k FileLog FileLog a b Source # 
Instance details

Defined in Shrun.Logging.Types.Internal