Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Node.Configuration.Logging
Synopsis
- data LoggingLayer = LoggingLayer {
- llBasicTrace :: forall m. MonadIO m => Trace m Text
- llLogDebug :: forall m a. (MonadIO m, Show a) => Trace m a -> a -> m ()
- llLogInfo :: forall m a. (MonadIO m, Show a) => Trace m a -> a -> m ()
- llLogNotice :: forall m a. (MonadIO m, Show a) => Trace m a -> a -> m ()
- llLogWarning :: forall m a. (MonadIO m, Show a) => Trace m a -> a -> m ()
- llLogError :: forall m a. (MonadIO m, Show a) => Trace m a -> a -> m ()
- llAppendName :: forall m a. Show a => LoggerName -> Trace m a -> Trace m a
- llBracketMonadIO :: forall a t. Show a => Trace IO a -> Severity -> Text -> IO t -> IO t
- llBracketMonadM :: forall m a t. (MonadCatch m, MonadIO m, Show a) => Trace m a -> Severity -> Text -> m t -> m t
- llBracketMonadX :: forall m a t. (MonadIO m, Show a) => Trace m a -> Severity -> Text -> m t -> m t
- llBracketStmIO :: forall a t. Show a => Trace IO a -> Severity -> Text -> STM t -> IO t
- llBracketStmLogIO :: forall a t. Show a => Trace IO a -> Severity -> Text -> STM (t, [(LOMeta, LOContent a)]) -> IO t
- llConfiguration :: Configuration
- llAddBackend :: Backend Text -> BackendKind -> IO ()
- llSwitchboard :: Switchboard Text
- createLoggingLayer :: Text -> NodeConfiguration -> ExceptT ConfigError IO LoggingLayer
- shutdownLoggingLayer :: LoggingLayer -> IO ()
- type Trace (m :: Type -> Type) a = Tracer m (LoggerName, LogObject a)
- data Configuration
- type LoggerName = Text
- data Severity
- mkLOMeta :: MonadIO m => Severity -> PrivacyAnnotation -> m LOMeta
- data LOMeta = LOMeta {}
- data LOContent a
Documentation
data LoggingLayer Source #
The LoggingLayer interface that we can expose. We want to do this since we want to be able to mock out any function tied to logging.
The good side of this is that _each function has it's own effects_ and that is ideal for tracking the functions effects and constraining the user (programmer) of those function to use specific effects in them. https://github.com/input-output-hk/cardano-sl/blob/develop/util/src/Pos/Util/Log/LogSafe.hs
Constructors
LoggingLayer | |
Fields
|
createLoggingLayer :: Text -> NodeConfiguration -> ExceptT ConfigError IO LoggingLayer Source #
Create logging feature for `cardano-node`
shutdownLoggingLayer :: LoggingLayer -> IO () Source #
data Configuration Source #
type LoggerName = Text Source #
Instances
Bounded Severity | |
Enum Severity | |
Defined in Cardano.BM.Data.Severity | |
Eq Severity | |
Ord Severity | |
Defined in Cardano.BM.Data.Severity | |
Read Severity | |
Show Severity | |
Generic Severity | |
Semigroup Severity | |
Monoid Severity | |
ToJSON Severity | |
FromJSON Severity | |
type Rep Severity | |
Defined in Cardano.BM.Data.Severity type Rep Severity = D1 ('MetaData "Severity" "Cardano.BM.Data.Severity" "iohk-monitoring-0.1.10.1-BqFV55szyQB5G0w1rSbKDX" 'False) (((C1 ('MetaCons "Debug" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Info" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Notice" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Warning" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Error" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Critical" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Alert" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Emergency" 'PrefixI 'False) (U1 :: Type -> Type)))) |
Constructors