Modulesandwich-0.3.1.0Haskell2010
Test.Sandwich.Formatters.LogSaver
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.
Contents
Synopsis
- value defaultLogSaverFormatter
- value logSaverPath
- value logSaverLogLevel
- value logSaverFormatter
- data LogPath
- type LogEntryFormatter
- Packagesandwich-0.3.1.0
- Exports6
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceLogSaver.hs
Options
Path where logs will be saved.
Minimum log level to save.
Formatter function for log entries.
Auxiliary types
A path under which to save logs.
Constructors
LogPathRelativeToRunRoot FilePathInterpret the path as relative to the test's run root. (If there is no run root, the logs won't be saved.)
LogPathAbsolute FilePathInterpret the path as an absolute path.
type
type LogEntryFormatter = UTCTime -> Loc -> LogSource -> LogLevel -> ByteString -> ByteStringA callback for formatting a log entry to a ByteString.