@@ -31,9 +31,9 @@ module Colog.Json.Internal.Structured
31
31
, Message (.. )
32
32
, LogStr (.. )
33
33
, PushContext (.. )
34
- -- * Katip compatibility .
34
+ -- * Internals .
35
35
, Severity (.. )
36
- , commonSeverity
36
+ , encodeSeverity
37
37
, showLS
38
38
, ls
39
39
, sl
@@ -52,7 +52,7 @@ import Foreign.C
52
52
import GHC.Conc
53
53
import GHC.Exts hiding (toList )
54
54
55
- -- | Structured message.
55
+ -- | Part of the structured message.
56
56
data Structured
57
57
= Segment T. Text -- ^ Part of the message that is associated this the context of code.
58
58
| Attr T. Text Encoding -- ^ Add attribute to the list.
@@ -85,16 +85,16 @@ data Severity
85
85
deriving (Show , Bounded , Eq , Ord , Enum )
86
86
87
87
-- | Convert severity into the one accepted by the loger.
88
- commonSeverity :: Severity -> Aeson. Encoding
89
- {-# INLINE commonSeverity #-}
90
- commonSeverity DebugS = Aeson. text " DEBUG"
91
- commonSeverity InfoS = Aeson. text " INFO"
92
- commonSeverity NoticeS = Aeson. text " NOTICE"
93
- commonSeverity WarningS = Aeson. text " WARNING"
94
- commonSeverity ErrorS = Aeson. text " ERROR"
95
- commonSeverity CriticalS = Aeson. text " CRITICAL"
96
- commonSeverity AlertS = Aeson. text " ALERT"
97
- commonSeverity EmergencyS = Aeson. text " EMERGENCY"
88
+ encodeSeverity :: Severity -> Aeson. Encoding
89
+ {-# INLINE encodeSeverity #-}
90
+ encodeSeverity DebugS = Aeson. text " DEBUG"
91
+ encodeSeverity InfoS = Aeson. text " INFO"
92
+ encodeSeverity NoticeS = Aeson. text " NOTICE"
93
+ encodeSeverity WarningS = Aeson. text " WARNING"
94
+ encodeSeverity ErrorS = Aeson. text " ERROR"
95
+ encodeSeverity CriticalS = Aeson. text " CRITICAL"
96
+ encodeSeverity AlertS = Aeson. text " ALERT"
97
+ encodeSeverity EmergencyS = Aeson. text " EMERGENCY"
98
98
99
99
-- | Wrapper over the structured message builder.
100
100
newtype PushContext = PushContext (Seq Structured -> Seq Structured )
0 commit comments