Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Test.Sandwich.Formatters.LogSaver
Contents
Description
A simple formatter that saves all logs from the test to a file.
This is a "secondary formatter," i.e. one that can run in the background while a "primary formatter" (such as the TerminalUI or Print formatters) monopolize the foreground.
Documentation can be found here.
Synopsis
- defaultLogSaverFormatter :: LogSaverFormatter
- logSaverPath :: LogSaverFormatter -> LogPath
- logSaverLogLevel :: LogSaverFormatter -> LogLevel
- logSaverFormatter :: LogSaverFormatter -> LogEntryFormatter
- data LogPath
- type LogEntryFormatter = UTCTime -> Loc -> LogSource -> LogLevel -> LogStr -> ByteString
Documentation
defaultLogSaverFormatter :: LogSaverFormatter Source #
Options
logSaverPath :: LogSaverFormatter -> LogPath Source #
Path where logs will be saved.
logSaverLogLevel :: LogSaverFormatter -> LogLevel Source #
Minimum log level to save.
logSaverFormatter :: LogSaverFormatter -> LogEntryFormatter Source #
Formatter function for log entries.
Auxiliary types
A path under which to save logs.
Constructors
LogPathRelativeToRunRoot FilePath | Interpret the path as relative to the test's run root. (If there is no run root, the logs won't be saved.) |
LogPathAbsolute FilePath | Interpret the path as an absolute path. |
type LogEntryFormatter = UTCTime -> Loc -> LogSource -> LogLevel -> LogStr -> ByteString Source #
A callback for formatting a log entry to a ByteString
.