Skip to content

Commit

Permalink
add default monitoring configuration as enforced by initTracer with N…
Browse files Browse the repository at this point in the history
…othing

nix patch
  • Loading branch information
paweljakubas committed Dec 22, 2019
1 parent e03c561 commit 84f0c6f
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/cli/test/unit/Cardano/CLISpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,12 @@ spec = do
requireFilePath fp
fileConfig <- getCG . fst . snd <$> initTracer (Just fp) Debug
compareCfgs defaultConfig fileConfig
it "default setting" $ do
defaultConfig <- getCG . fst . snd <$> initTracer Nothing Debug
let fp = "../../specifications/logging/default.yaml"
requireFilePath fp
fileConfig <- getCG . fst . snd <$> initTracer (Just fp) Debug
compareCfgs defaultConfig fileConfig
where
backspace :: Text
backspace = T.singleton (toEnum 127)
Expand Down
1 change: 1 addition & 0 deletions nix/.stack.nix/cardano-wallet-cli.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions specifications/logging/default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# this is a default logging configuration of cli

# global filter; messages must have at least this severity to pass:
minSeverity: Debug

# here we set up outputs of logging in 'katip':
setupScribes:
- scKind: StdoutSK
scFormat: ScText
scName: text
- scKind: StdoutSK
scFormat: ScJson
scName: json

# if not indicated otherwise, then log output is directed to this:
defaultScribes:
- - StdoutSK
- text

# this is probably a bug of parsing, cannot enforce cgBindAddrPrometheus = Nothing
#hasPrometheus: ["",0]
#hasPrometheus:

# these backends are initialized:
setupBackends: [AggregationBK, KatipBK]

# if not indicated otherwise, then messages are passed to these backends:
defaultBackends:
- KatipBK

# more options which can be passed as key-value pairs:
options:
mapSubtrace:
"#messagecounters.monitoring":
subtrace: NoTrace
"#messagecounters.ekgview":
subtrace: NoTrace
"#messagecounters.aggregation":
subtrace: NoTrace
"#messagecounters.graylog":
subtrace: NoTrace
"#messagecounters.katip":
subtrace: NoTrace
"#messagecounters.switchboard":
subtrace: NoTrace
7 changes: 6 additions & 1 deletion specifications/logging/empty.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# this is a default stdout configuration of iohk-monitoring-framework
# this is a default logging configuration of iohk-monitoring-framework
# when initialized with defaultConfigStdout

# global filter; messages must have at least this severity to pass:
minSeverity: Debug
Expand All @@ -17,6 +18,10 @@ defaultScribes:
- - StdoutSK
- text

# this is probably a bug of parsing, cannot enforce cgBindAddrPrometheus = Nothing
#hasPrometheus: ["",0]
#hasPrometheus:

# these backends are initialized:
setupBackends: [KatipBK]

Expand Down

0 comments on commit 84f0c6f

Please sign in to comment.