tinylog-0.10.2: Simplistic logging using fast-logger.

Safe HaskellNone

System.Logger.Message

Synopsis

Documentation

data Msg Source

Type representing log messages.

msg :: ToBytes a => a -> Msg -> MsgSource

Turn some value into a Msg.

field :: ToBytes a => ByteString -> a -> Msg -> MsgSource

Render some field, i.e. a key-value pair delimited by "=".

(.=) :: ToBytes a => ByteString -> a -> Msg -> MsgSource

Alias of field.

(+++) :: (ToBytes a, ToBytes b) => a -> b -> BuilderSource

Concatenate two ToBytes values.

(~~) :: (b -> c) -> (a -> b) -> a -> cSource

Alias of . with lowered precedence to allow combination with .= without requiring parentheses.

val :: ByteString -> BuilderSource

Type restriction. Useful to disambiguate string literals when using OverloadedStrings pragma.

render :: ByteString -> Bool -> (Msg -> Msg) -> ByteStringSource

Intersperse parts of the log message with the given delimiter and render the whole builder into a ByteString.

If the second parameter is set to True, netstrings encoding is used for the message elements. Cf. http://cr.yp.to/proto/netstrings.txt for details.