Safe Haskell | None |
---|---|
Language | Haskell2010 |
Bcc.Node.Configuration.Logging
Synopsis
- data LoggingLayer = LoggingLayer {
- llBasicTrace ∷ ∀ m. MonadIO m ⇒ Trace m Text
- llLogDebug ∷ ∀ m a. (MonadIO m, Show a) ⇒ Trace m a → a → m ()
- llLogInfo ∷ ∀ m a. (MonadIO m, Show a) ⇒ Trace m a → a → m ()
- llLogNotice ∷ ∀ m a. (MonadIO m, Show a) ⇒ Trace m a → a → m ()
- llLogWarning ∷ ∀ m a. (MonadIO m, Show a) ⇒ Trace m a → a → m ()
- llLogError ∷ ∀ m a. (MonadIO m, Show a) ⇒ Trace m a → a → m ()
- llAppendName ∷ ∀ m a. Show a ⇒ LoggerName → Trace m a → Trace m a
- llBracketMonadIO ∷ ∀ a t. Show a ⇒ Trace IO a → Severity → Text → IO t → IO t
- llBracketMonadM ∷ ∀ m a t. (MonadCatch m, MonadIO m, Show a) ⇒ Trace m a → Severity → Text → m t → m t
- llBracketMonadX ∷ ∀ m a t. (MonadIO m, Show a) ⇒ Trace m a → Severity → Text → m t → m t
- llBracketStmIO ∷ ∀ a t. Show a ⇒ Trace IO a → Severity → Text → STM t → IO t
- llBracketStmLogIO ∷ ∀ 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
- llEKGDirect ∷ Maybe EKGDirect
- data EKGDirect = EKGDirect {}
- createLoggingLayer ∷ Text → NodeConfiguration → SomeConsensusProtocol → ExceptT ConfigError IO LoggingLayer
- nodeBasicInfo ∷ NodeConfiguration → SomeConsensusProtocol → UTCTime → IO [LogObject Text]
- shutdownLoggingLayer ∷ LoggingLayer → IO ()
- traceCounter ∷ Text → Trace IO Text → Int → 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
- = LogMessage a
- | LogError !Text
- | LogValue !Text !Measurable
- | LogStructuredText Object Text
- | LogStructured Object
- | ObserveOpen !CounterState
- | ObserveDiff !CounterState
- | ObserveClose !CounterState
- | AggregatedMessage [(Text, Aggregated)]
- | MonitoringEffect !MonitorAction
- | Command !CommandValue
- | KillPill
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/The-Blockchain-Company/bcc-sl/blob/develop/util/src/Pos/Util/Log/LogSafe.hs
Constructors
createLoggingLayer ∷ Text → NodeConfiguration → SomeConsensusProtocol → ExceptT ConfigError IO LoggingLayer Source #
Create logging feature for `bcc-node`
shutdownLoggingLayer ∷ LoggingLayer → IO () Source #
data Configuration #
type LoggerName = Text #
Instances
Constructors
LOMeta | |
Instances
Eq LOMeta | |
Show LOMeta | |
ToJSON LOMeta | |
Defined in Bcc.BM.Data.LogItem Methods toEncoding ∷ LOMeta → Encoding # toJSONList ∷ [LOMeta] → Value # toEncodingList ∷ [LOMeta] → Encoding # | |
FromJSON LOMeta | |
Defined in Bcc.BM.Data.LogItem |
Constructors
LogMessage a | |
LogError !Text | |
LogValue !Text !Measurable | |
LogStructuredText Object Text | |
LogStructured Object | |
ObserveOpen !CounterState | |
ObserveDiff !CounterState | |
ObserveClose !CounterState | |
AggregatedMessage [(Text, Aggregated)] | |
MonitoringEffect !MonitorAction | |
Command !CommandValue | |
KillPill |
Instances
Eq a ⇒ Eq (LOContent a) | |
Show a ⇒ Show (LOContent a) | |
ToJSON a ⇒ ToJSON (LOContent a) | |
Defined in Bcc.BM.Data.LogItem Methods toJSON ∷ LOContent a → Value # toEncoding ∷ LOContent a → Encoding # toJSONList ∷ [LOContent a] → Value # toEncodingList ∷ [LOContent a] → Encoding # | |
FromJSON a ⇒ FromJSON (LOContent a) | |
Defined in Bcc.BM.Data.LogItem | |
ToJSON a ⇒ ToObject (LOContent a) | |
Defined in Bcc.BM.Data.Tracer Methods toObject ∷ TracingVerbosity → LOContent a → Object # textTransformer ∷ LOContent a → Object → Text # |