| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Hermod.Tracing.Formatter
Synopsis
- data FormattedMessage
- data PreFormatted = PreFormatted {
- pfTime :: !UTCTime
- pfNamespace :: !Text
- pfThreadId :: !Text
- pfForHuman :: !(Maybe Text)
- pfForMachineObject :: Object
- data TraceObject = TraceObject {
- toHuman :: !(Maybe Text)
- toMachine :: !Text
- toNamespace :: ![Text]
- toSeverity :: !SeverityS
- toDetails :: !DetailLevel
- toTimestamp :: !UTCTime
- toHostname :: !Text
- toThreadId :: !Text
- metricsFormatter :: forall a m. (LogFormatting a, MonadIO m) => Trace m FormattedMessage -> Trace m a
- preFormatted :: (LogFormatting a, MonadIO m) => Bool -> Trace m PreFormatted -> Trace m a
- forwardFormatter :: forall a m. (MonadIO m, LogFormatting a) => Trace m FormattedMessage -> Trace m a
- forwardFormatter' :: forall m. MonadIO m => Trace m FormattedMessage -> Trace m PreFormatted
- machineFormatter :: forall a m. (MonadIO m, LogFormatting a) => Trace m FormattedMessage -> Trace m a
- machineFormatter' :: forall m. MonadIO m => Trace m FormattedMessage -> Trace m PreFormatted
- cborFormatter :: forall a m. (MonadIO m, LogFormatting a) => Trace m FormattedMessage -> Trace m a
- cborFormatter' :: forall m. MonadIO m => Trace m FormattedMessage -> Trace m PreFormatted
- humanFormatter :: forall a m. (MonadIO m, LogFormatting a) => Bool -> Trace m FormattedMessage -> Trace m a
- humanFormatter' :: forall m. MonadIO m => Bool -> Trace m FormattedMessage -> Trace m PreFormatted
Documentation
data FormattedMessage Source #
Constructors
| FormattedHuman Bool Text | The bool specifies if the formatting includes colours |
| FormattedMachine Text | |
| FormattedMetrics [Metric] | |
| FormattedForwarder TraceObject | |
| FormattedCBOR ByteString |
Instances
| Show FormattedMessage Source # | |
Defined in Hermod.Tracing.Formatter | |
| Eq FormattedMessage Source # | |
Defined in Hermod.Tracing.Formatter Methods (==) :: FormattedMessage -> FormattedMessage -> Bool Source # (/=) :: FormattedMessage -> FormattedMessage -> Bool Source # | |
data PreFormatted Source #
Constructors
| PreFormatted | |
Fields
| |
data TraceObject Source #
Used as interface object for ForwarderTracer
Constructors
| TraceObject | |
Fields
| |
Instances
metricsFormatter :: forall a m. (LogFormatting a, MonadIO m) => Trace m FormattedMessage -> Trace m a Source #
Format this trace as metrics
preFormatted :: (LogFormatting a, MonadIO m) => Bool -> Trace m PreFormatted -> Trace m a Source #
Transform this trace to a preformatted message, so that double serialization is avoided
forwardFormatter :: forall a m. (MonadIO m, LogFormatting a) => Trace m FormattedMessage -> Trace m a Source #
forwardFormatter' :: forall m. MonadIO m => Trace m FormattedMessage -> Trace m PreFormatted Source #
Format this trace as TraceObject for the trace forwarder
machineFormatter :: forall a m. (MonadIO m, LogFormatting a) => Trace m FormattedMessage -> Trace m a Source #
machineFormatter' :: forall m. MonadIO m => Trace m FormattedMessage -> Trace m PreFormatted Source #
Format this trace as TraceObject for machine-readable text output (JSON)
cborFormatter :: forall a m. (MonadIO m, LogFormatting a) => Trace m FormattedMessage -> Trace m a Source #
cborFormatter' :: forall m. MonadIO m => Trace m FormattedMessage -> Trace m PreFormatted Source #
Format this trace in binary serialisation (CBOR)
humanFormatter :: forall a m. (MonadIO m, LogFormatting a) => Bool -> Trace m FormattedMessage -> Trace m a Source #
humanFormatter' :: forall m. MonadIO m => Bool -> Trace m FormattedMessage -> Trace m PreFormatted Source #
Format this trace in human readable text output