Juvix imports
module arch.node.engines.logging;
import prelude open;
import arch.node.types.engine open;
import arch.node.engines.logging_messages open public;
import arch.node.engines.logging_environment open public;
import arch.node.engines.logging_behaviour open public;
import arch.node.engines.logging_config open public;
import arch.node.types.anoma as Anoma open;
open logging_config_example;
open logging_environment_example;
Logging Engine¶
Purpose¶
The Logging Engine provides capabilities for recording, monitoring, analyzing, and managing events and activities locally on the physical machine that the Anoma node is running. It supports diagnostic efforts, security monitoring, performance optimization, and historical analysis to ensure stability, security, and efficiency.
Components¶
Type¶
LoggingEngine : Type :=
Engine
LoggingCfg
LoggingLocalState
LoggingMailboxState
LoggingTimerHandle
LoggingActionArguments
Anoma.Msg
Anoma.Cfg
Anoma.Env;
Example of a logging engine¶
exampleLoggingEngine : LoggingEngine :=
mkEngine@{
cfg := loggingCfg;
env := loggingEnv;
behaviour := loggingBehaviour;
};
where loggingCfg
is defined as follows:
loggingCfg : EngineCfg LoggingCfg :=
mkEngineCfg@{
node := Curve25519PubKey "0xabcd1234";
name := "logging";
cfg := mkLoggingCfg;
};
loggingEnv
is defined as follows:
loggingEnv : LoggingEnv :=
mkEngineEnv@{
localState :=
mkLoggingLocalState@{
logbook := [];
};
mailboxCluster := Map.empty;
acquaintances := Set.empty;
timers := [];
};
and loggingBehaviour
is defined as follows:
loggingBehaviour : LoggingBehaviour :=
mkEngineBehaviour@{
guards := First [appendLogGuard];
};