Skip to content

Commit

Permalink
Fix NodeConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
kderme committed Nov 20, 2020
1 parent 664fc69 commit 39cca7b
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 2 deletions.
50 changes: 50 additions & 0 deletions configuration/morpho-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ NodeId: 0
Protocol: MockedBFT
NumCoreNodes: 1
RequiresNetworkMagic: RequiresMagic
NetworkMagic : 12345
SecurityParam : 3
TurnOnLogging: True
ViewMode: SimpleView
TurnOnLogMetrics: True
Expand Down Expand Up @@ -108,3 +110,51 @@ TraceTxOutbound: True

# Trace TxSubmission protocol messages.
TraceTxSubmissionProtocol: True

##### LoggingFeature Configuration #####

# EKG is a simple metrics monitoring system. Uncomment the following to listen
# on the given local port and point your web browser to http://localhost:12788/
# for a live view. The same URL can also serve JSON output.
# hasEKG: 12788

# The Prometheus monitoring system can also be used. Uncomment the following
# to listen on the given port
# hasPrometheus: 12789

# For the Katip logging backend we must set up outputs (called scribes)
# The available types of scribe are:
# FileSK for files
# StdoutSK/StdoutSK for stdout/stderr
# JournalSK for systemd's journal system
# DevNullSK
# The scribe output format can be ScText or ScJson. Log rotation settings can
# be specified in the defaults below or overidden on a per-scribe basis here.
setupScribes:
- scKind: FileSK
scName: "logs/staging.log"
scFormat: ScText

- scKind: StdoutSK
scName: stdout
scFormat: ScText
scRotation: null

# For the Katip logging backend this specifies the default scribes that trace
# output is sent to if it is not configured to be sent to other scribes.
defaultScribes:
- - FileSK
- "logs/staging.log"

- - StdoutSK
- stdout

setupBackends:
- KatipBK

defaultBackends:
- KatipBK

##### Fine grained logging control #####
options:
mapBackends:
4 changes: 2 additions & 2 deletions morpho-checkpoint-node/tests/Test/Morpho/Golden.hs
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ test_golden_ApplyTxErr =

test_golden_parseNodeConfiguration :: Assertion
test_golden_parseNodeConfiguration = do
cfg <- parseNodeConfiguration "tests/Test/Morpho/Golden/Config.yaml"
cfg <- parseNodeConfiguration "tests/configuration/Golden/Config.yaml"
assertEqual "NodeConfiguration" cfg exampleNodeConfig

test_golden_parseTopology :: Assertion
test_golden_parseTopology = do
topology <- readTopologyFile "tests/Test/Morpho/Golden/Topology.json"
topology <- readTopologyFile "tests/configuration/Golden/Topology.json"
assertEqual "Topology" topology (Right exampleTopology)
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ NodeId: 0
Protocol: MockedBFT
NumCoreNodes: 1
RequiresNetworkMagic: RequiresMagic
NetworkMagic : 12345
SystemStart: "2009-02-13T23:13:09Z"
SecurityParam : 3
TurnOnLogging: True
ViewMode: SimpleView
TurnOnLogMetrics: True
Expand Down Expand Up @@ -35,6 +38,8 @@ LastKnownBlockVersion-Alt: 0

##### Tracing #####

minSeverity: Notice

# MinimalVerbosity: Minimal level of the rendering of captured items
# MaximalVerbosity: Maximal level of the rendering of captured items
# NormalVerbosity: the default level of the rendering of captured items
Expand Down Expand Up @@ -108,3 +113,52 @@ TraceTxOutbound: True

# Trace TxSubmission protocol messages.
TraceTxSubmissionProtocol: True


##### LoggingFeature Configuration #####

# EKG is a simple metrics monitoring system. Uncomment the following to listen
# on the given local port and point your web browser to http://localhost:12788/
# for a live view. The same URL can also serve JSON output.
# hasEKG: 12788

# The Prometheus monitoring system can also be used. Uncomment the following
# to listen on the given port
# hasPrometheus: 12789

# For the Katip logging backend we must set up outputs (called scribes)
# The available types of scribe are:
# FileSK for files
# StdoutSK/StdoutSK for stdout/stderr
# JournalSK for systemd's journal system
# DevNullSK
# The scribe output format can be ScText or ScJson. Log rotation settings can
# be specified in the defaults below or overidden on a per-scribe basis here.
setupScribes:
- scKind: FileSK
scName: "logs/staging.log"
scFormat: ScText

- scKind: StdoutSK
scName: stdout
scFormat: ScText
scRotation: null

# For the Katip logging backend this specifies the default scribes that trace
# output is sent to if it is not configured to be sent to other scribes.
defaultScribes:
- - FileSK
- "logs/staging.log"

- - StdoutSK
- stdout

setupBackends:
- KatipBK

defaultBackends:
- KatipBK

##### Fine grained logging control #####
options:
mapBackends:

0 comments on commit 39cca7b

Please sign in to comment.