co-log-0.1.0: Logging library

Safe HaskellNone
LanguageHaskell2010

Colog.Actions

Contents

Synopsis

String actions

logStringStdout :: MonadIO m => LogAction m String Source #

Action that prints String to stdout.

logStringStderr :: MonadIO m => LogAction m String Source #

Action that prints String to stderr.

logStringHandle :: MonadIO m => Handle -> LogAction m String Source #

Action that prints String to Handle.

withLogStringFile :: MonadIO m => FilePath -> (LogAction m String -> IO r) -> IO r Source #

Action that prints String to file. Instead of returning LogAction it's implemented in continuation-passing style because it's more efficient to open file only once at the start of the application and write to Handle instead of opening file each time we need to write to it.

Opens file in AppendMode.

ByteString actions

logByteStringStdout :: MonadIO m => LogAction m ByteString Source #

Action that prints ByteString to stdout.

logByteStringStderr :: MonadIO m => LogAction m ByteString Source #

Action that prints ByteString to stderr.

logByteStringHandle :: MonadIO m => Handle -> LogAction m ByteString Source #

Action that prints ByteString to Handle.

withLogByteStringFile :: MonadIO m => FilePath -> (LogAction m ByteString -> IO r) -> IO r Source #

Action that prints ByteString to file. See withLogStringFile for details.

Text actions

logTextStdout :: MonadIO m => LogAction m Text Source #

Action that prints Text to stdout.

logTextStderr :: MonadIO m => LogAction m Text Source #

Action that prints Text to stderr.

logTextHandle :: MonadIO m => Handle -> LogAction m Text Source #

Action that prints Text to Handle.

withLogTextFile :: MonadIO m => FilePath -> (LogAction m Text -> IO r) -> IO r Source #

Action that prints Text to file. See withLogStringFile for details.