Skip to content

Commit 35ef33c

Browse files
committed
network-mux:logging - patterns
1 parent bb079a9 commit 35ef33c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

network-mux/cardano-logging/Network/Mux/Logging.hs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,9 @@ instance LogFormatting Mux.Trace where
426426
, "msg" .= String "Mux stoppped"
427427
]
428428

429+
forMachine _dtal (Mux.TraceNewMux _) = mconcat []
430+
forMachine _dtal Mux.TraceStarting = mconcat []
431+
429432
forHuman (Mux.TraceState new) =
430433
sformat ("State: " % shown) new
431434
forHuman (Mux.TraceCleanExit mid dir) =
@@ -447,6 +450,9 @@ instance LogFormatting Mux.Trace where
447450
forHuman Mux.TraceStopping = "Mux stopping"
448451
forHuman Mux.TraceStopped = "Mux stoppped"
449452

453+
forHuman (Mux.TraceNewMux _) = ""
454+
forHuman Mux.TraceStarting = ""
455+
450456
instance MetaTrace Mux.Trace where
451457
namespaceFor Mux.TraceState {} =
452458
Namespace [] ["State"]
@@ -469,6 +475,9 @@ instance MetaTrace Mux.Trace where
469475
namespaceFor Mux.TraceStopped =
470476
Namespace [] ["Stopped"]
471477

478+
namespaceFor (Mux.TraceNewMux _) = Namespace [] []
479+
namespaceFor Mux.TraceStarting = Namespace [] []
480+
472481
severityFor (Namespace _ ["State"]) _ = Just Info
473482
severityFor (Namespace _ ["CleanExit"]) _ = Just Notice
474483
severityFor (Namespace _ ["ExceptionExit"]) _ = Just Notice

0 commit comments

Comments
 (0)