| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cardano.Logging.ConfigurationParser
Contents
Synopsis
- mkConfiguration :: TraceConfig
- mkConfigurationWithFallback :: SeverityS -> DetailLevel -> BackendConfig -> TraceConfig
- readConfiguration :: FilePath -> IO TraceConfig
- readConfigurationWithFallback :: SeverityS -> DetailLevel -> BackendConfig -> FilePath -> IO TraceConfig
- readConfiguration' :: FilePath -> IO TraceConfig
- readConfigurationWithFallback' :: SeverityS -> DetailLevel -> BackendConfig -> FilePath -> IO TraceConfig
- readConfigurationWithDefault :: FilePath -> TraceConfig -> IO TraceConfig
- readConfigurationWithFallbackAndDefault :: SeverityS -> DetailLevel -> BackendConfig -> FilePath -> TraceConfig -> IO TraceConfig
- applyFallback :: SeverityS -> DetailLevel -> BackendConfig -> TraceConfig -> TraceConfig
- configToRepresentation :: TraceConfig -> ConfigRepresentation
Documentation
mkConfiguration :: TraceConfig Source #
Creates the minimal viable configuration by only setting fallback values in an empty TraceConfig. Fallback options for the namespace root: Notice severity, normal detail, JSON stdout logging. Notice severity was chosen as it will never filter out any actionable traces while creating minimal noise in the log.
mkConfigurationWithFallback :: SeverityS -> DetailLevel -> BackendConfig -> TraceConfig Source #
Creates the minimal viable configuration by only setting custom fallback values in an empty TraceConfig. Fallback options for the namespace root: custom values.
readConfiguration :: FilePath -> IO TraceConfig Source #
Read a configuration file and return the internal representation. Fallback options for the namespace root: Notice severity, normal detail, JSON stdout logging.
readConfigurationWithFallback :: SeverityS -> DetailLevel -> BackendConfig -> FilePath -> IO TraceConfig Source #
Read a configuration file and return the internal representation. Fallback options for the namespace root: custom values.
readConfiguration' :: FilePath -> IO TraceConfig Source #
Read a configuration file and return the internal representation.
This will silently provide a minimal viable config via mkConfiguration when the file is absent.
Fallback options for the namespace root: Notice severity, normal detail, JSON stdout logging.
readConfigurationWithFallback' :: SeverityS -> DetailLevel -> BackendConfig -> FilePath -> IO TraceConfig Source #
Read a configuration file and return the internal representation.
This will silently provide a minimal viable config via mkConfigurationWithFallback when the file is absent.
Fallback options for the namespace root: custom values.
readConfigurationWithDefault :: FilePath -> TraceConfig -> IO TraceConfig Source #
Read a configuration file and return the internal representation.
TraceConfig fields not specified in the file will be taken from the provided defaultConf (when given there).
Fallback options for the namespace root: Notice severity, normal detail, JSON stdout logging.
readConfigurationWithFallbackAndDefault :: SeverityS -> DetailLevel -> BackendConfig -> FilePath -> TraceConfig -> IO TraceConfig Source #
Read a configuration file and return the internal representation.
TraceConfig fields not specified in the file will be taken from the provided defaultConf (when given there).
Fallback options for the namespace root: custom values.
applyFallback :: SeverityS -> DetailLevel -> BackendConfig -> TraceConfig -> TraceConfig Source #
Applies the fallback values to the namespace root, or creates a namespace root from them if none is present.
Furthermore, it ensures a metric prefix is properly namespaced, if there is one configured.
If you do not use any of mkConfiguration* or readConfiguration* to create your TraceConfig, but do it manually,
it is highly recommended to call applyFallback on that TraceConfig value as a last step before using it.
configToRepresentation :: TraceConfig -> ConfigRepresentation Source #
Convert config from internal to external representation
Orphan instances
| ToJSON TraceConfig Source # | |
Methods toJSON :: TraceConfig -> Value toEncoding :: TraceConfig -> Encoding toJSONList :: [TraceConfig] -> Value toEncodingList :: [TraceConfig] -> Encoding omitField :: TraceConfig -> Bool | |