Skip to content

Commit eb2e9d4

Browse files
committed
network-mux:logging - patterns
1 parent ccb2edd commit eb2e9d4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,9 @@ instance LogFormatting Mux.Trace where
409409
, "msg" .= String "Mux stoppped"
410410
]
411411

412+
forMachine _dtal (Mux.TraceNewMux _) = mconcat []
413+
forMachine _dtal Mux.TraceStarting = mconcat []
414+
412415
forHuman (Mux.TraceState new) =
413416
sformat ("State: " % shown) new
414417
forHuman (Mux.TraceCleanExit mid dir) =
@@ -430,6 +433,9 @@ instance LogFormatting Mux.Trace where
430433
forHuman Mux.TraceStopping = "Mux stopping"
431434
forHuman Mux.TraceStopped = "Mux stoppped"
432435

436+
forHuman (Mux.TraceNewMux _) = ""
437+
forHuman Mux.TraceStarting = ""
438+
433439
instance MetaTrace Mux.Trace where
434440
namespaceFor Mux.TraceState {} =
435441
Namespace [] ["State"]
@@ -452,6 +458,9 @@ instance MetaTrace Mux.Trace where
452458
namespaceFor Mux.TraceStopped =
453459
Namespace [] ["Stopped"]
454460

461+
namespaceFor (Mux.TraceNewMux _) = Namespace [] []
462+
namespaceFor Mux.TraceStarting = Namespace [] []
463+
455464
severityFor (Namespace _ ["State"]) _ = Just Info
456465
severityFor (Namespace _ ["CleanExit"]) _ = Just Notice
457466
severityFor (Namespace _ ["ExceptionExit"]) _ = Just Notice

0 commit comments

Comments
 (0)