trace-dispatcher-2.5.2: Tracers for Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Logging.Configuration

Synopsis

Documentation

configureTracers :: forall a m. (MetaTrace a, MonadIO m) => ConfigReflection -> TraceConfig -> [Trace m a] -> m () Source #

Call this function at initialisation, and later for reconfiguration. Config reflection is used to optimise the tracers and has to collect information about the tracers. Although it is possible to give more then one tracer of the same time, it is not a common case to do this.

withNamespaceConfig :: forall m a b c. (MonadIO m, Ord b) => String -> (TraceConfig -> Namespace a -> m b) -> (Maybe b -> Trace m c -> m (Trace m a)) -> Trace m c -> m (Trace m a) Source #

Take a selector function called extract. Take a function from trace to trace with this config dependent value. In this way construct a trace transformer with a config value

filterSeverityFromConfig :: MonadIO m => Trace m a -> m (Trace m a) Source #

Filter a trace by severity and take the filter value from the config

withDetailsFromConfig :: MonadIO m => Trace m a -> m (Trace m a) Source #

Set detail level of a trace from the config

withBackendsFromConfig :: MonadIO m => (Maybe [BackendConfig] -> Trace m FormattedMessage -> m (Trace m a)) -> m (Trace m a) Source #

Routing and formatting of a trace from the config

withLimitersFromConfig :: forall a m. MonadUnliftIO m => Trace m TraceDispatcherMessage -> Trace m a -> m (Trace m a) Source #

Routing and formatting of a trace from the config

maybeSilent :: forall m a. MonadIO m => (TraceConfig -> Namespace a -> Bool) -> [Text] -> Bool -> Trace m a -> m (Trace m a) Source #

Switch off any message of a particular tracer based on the configuration. If the top tracer is silent and no subtracer is not silent, then switch it off

getSeverity :: TraceConfig -> Namespace a -> SeverityF Source #

If no severity can be found in the config, it is set to Warning

getDetails :: TraceConfig -> Namespace a -> DetailLevel Source #

If no details can be found in the config, it is set to DNormal

getBackends :: TraceConfig -> Namespace a -> [BackendConfig] Source #

If no backends can be found in the config, it is set to [EKGBackend, Forwarder, Stdout HumanFormatColoured]