Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- logStringStdout :: MonadIO m => LogAction m String
- logStringStderr :: MonadIO m => LogAction m String
- logStringHandle :: MonadIO m => Handle -> LogAction m String
- withLogStringFile :: MonadIO m => FilePath -> (LogAction m String -> IO r) -> IO r
- logByteStringStdout :: MonadIO m => LogAction m ByteString
- logByteStringStderr :: MonadIO m => LogAction m ByteString
- logByteStringHandle :: MonadIO m => Handle -> LogAction m ByteString
- withLogByteStringFile :: MonadIO m => FilePath -> (LogAction m ByteString -> IO r) -> IO r
- logTextStdout :: MonadIO m => LogAction m Text
- logTextStderr :: MonadIO m => LogAction m Text
- logTextHandle :: MonadIO m => Handle -> LogAction m Text
- withLogTextFile :: MonadIO m => FilePath -> (LogAction m Text -> IO r) -> IO r
String
actions
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
withLogTextFile :: MonadIO m => FilePath -> (LogAction m Text -> IO r) -> IO r Source #
Action that prints Text
to file. See withLogStringFile
for details.