katip-scalyr-scribe-0.1.0.1: A katip scribe for logging to json

Safe HaskellNone
LanguageHaskell2010

Katip.Scribes.Scalyr

Synopsis

Documentation

mkScalyrScribe :: Handle -> Severity -> Verbosity -> IO Scribe Source #

Logs to a file handle such as stdout, stderr, or a file. Contexts and other information will be flattened out into bracketed fields. The flattening converts field names to uppercase, e.g.

{"foo": {"bar": 42}}

is parsed as

fooBar = 42

Naturally, collisions between flattened fields and actual values may happen. There is currently no mitigation, and I'm not sure what Scalyr does in that case. Keep your json snake_case only and you should be golden.

Returns the newly-created Scribe. The finalizer flushes the handle. Handle mode is set to LineBuffering automatically.

scalyrLogEnv :: Text -> Environment -> Severity -> Verbosity -> IO LogEnv Source #

Creates a scribe for scalyr. Pass the application name, and the environment, e.g. staging or production.