co-log-0.5.0.0: Composable Contravariant Comonadic Logging Library
Copyright(c) 2018-2022 Kowainik
LicenseMPL-2.0
MaintainerKowainik <xrom.xkov@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Colog.Actions

Description

Logging actions for various text types.

Synopsis

ByteString actions

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

Action that prints ByteString to stdout. This action does not flush the output buffer. If buffering mode is block buffering, the effect of this action can be delayed.

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

Action that prints ByteString to stderr. This action does not flush the output buffer. If buffering mode is block buffering, the effect of this action can be delayed.

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

Action that prints ByteString to Handle. This action does not flush the output buffer. If buffering mode is block buffering, the effect of this action can be delayed.

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. This action does not flush the output buffer. If buffering mode is block buffering, the effect of this action can be delayed.

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

Action that prints Text to stderr. This action does not flush the output buffer. If buffering mode is block buffering, the effect of this action can be delayed.

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

Action that prints Text to Handle. This action does not flush the output buffer. If buffering mode is block buffering, the effect of this action can be delayed.

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

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

Message actions

Default logging actions to make the usage with Messages easier.

richMessageAction :: MonadIO m => LogAction m Message Source #

Action that constructs RichMessage and prints formatted Message for it to stdout.