@@ -53,6 +53,11 @@ import System.Posix
5353
5454
5555-------------------------------------------------------------------------------
56+-- | Represents a heirarchy of namespaces going from general to
57+-- specific. For instance: ["processname", "subsystem"]. Note that
58+-- single-segment namespaces can be created using
59+-- IsString/OverloadedStrings, so "foo" will result in Namespace
60+-- ["foo"].
5661newtype Namespace = Namespace { unNamespace :: [Text] }
5762 deriving (Eq,Show,Read,Ord,Generic,ToJSON,FromJSON,Monoid)
5863
@@ -168,6 +173,7 @@ ls = logStr
168173
169174
170175-------------------------------------------------------------------------------
176+-- | Convert any showable type into a LogStr.
171177showLS :: Show a => a -> LogStr
172178showLS = ls . show
173179
@@ -181,6 +187,7 @@ newtype ThreadIdText = ThreadIdText {
181187mkThreadIdText :: ThreadId -> ThreadIdText
182188mkThreadIdText = ThreadIdText . T.pack . show
183189
190+
184191-------------------------------------------------------------------------------
185192-- | This has everything each log message will contain.
186193data Item a = Item {
@@ -341,7 +348,15 @@ instance ToObject ()
341348instance ToObject A.Object
342349
343350-------------------------------------------------------------------------------
344−-- | Payload objects need instances of this class.
351+-- | Payload objects need instances of this class. LogItem makes it so
352+-- that you can have very verbose items getting logged with lots of
353+-- extra fields but under normal circumstances, if your scribe is
354+-- configured for a lower verbosity level, it will only log a
355+-- selection of those keys. Furthermore, each 'Scribe' can be
356+-- configured with a different 'Verbosity' level. You could even use
357+-- 'registerScribe', 'unregisterScribe', and 'clearScribes' to at
358+-- runtime swap out your existing scribes for more verbose debugging
359+-- scribes if you wanted to.
345360--
346361-- When defining 'payloadKeys', don't redundantly declare the same
347362-- keys for higher levels of verbosity. Each level of verbosity
@@ -666,7 +681,7 @@ getLoc = [| $(location >>= liftLoc) |]
666681
667682
668683-------------------------------------------------------------------------------
669−-- | 'Loc'-tagged logging when using template-haskell is OK.
684+-- | 'Loc'-tagged logging when using template-haskell.
670685--
671686-- @$(logT) obj mempty InfoS "Hello world"@
672687logT :: ExpQ