@@ -53,6 +53,11 @@ import System.Posix
55-------------------------------------------------------------------------------
55-------------------------------------------------------------------------------
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
56newtype Namespace = Namespace { unNamespace :: [Text] }
61newtype Namespace = Namespace { unNamespace :: [Text] }
57 deriving (Eq,Show,Read,Ord,Generic,ToJSON,FromJSON,Monoid)
62 deriving (Eq,Show,Read,Ord,Generic,ToJSON,FromJSON,Monoid)
@@ -168,6 +173,7 @@ ls = logStr
170-------------------------------------------------------------------------------
175-------------------------------------------------------------------------------
176+-- | Convert any showable type into a LogStr.
171showLS :: Show a => a -> LogStr
177showLS :: Show a => a -> LogStr
172showLS = ls . show
178showLS = ls . show
@@ -181,6 +187,7 @@ newtype ThreadIdText = ThreadIdText {
181mkThreadIdText :: ThreadId -> ThreadIdText
187mkThreadIdText :: ThreadId -> ThreadIdText
182mkThreadIdText = ThreadIdText . T.pack . show
188mkThreadIdText = ThreadIdText . T.pack . show
184-------------------------------------------------------------------------------
191-------------------------------------------------------------------------------
185-- | This has everything each log message will contain.
192-- | This has everything each log message will contain.
186data Item a = Item {
193data Item a = Item {
@@ -341,7 +348,15 @@ instance ToObject ()
341instance ToObject A.Object
348instance ToObject A.Object
343-------------------------------------------------------------------------------
350-------------------------------------------------------------------------------
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.
346-- When defining 'payloadKeys', don't redundantly declare the same
361-- When defining 'payloadKeys', don't redundantly declare the same
347-- keys for higher levels of verbosity. Each level of verbosity
362-- keys for higher levels of verbosity. Each level of verbosity
@@ -666,7 +681,7 @@ getLoc = [| $(location >>= liftLoc) |]
668-------------------------------------------------------------------------------
683-------------------------------------------------------------------------------
669−-- | 'Loc'-tagged logging when using template-haskell is OK.
684+-- | 'Loc'-tagged logging when using template-haskell.
671-- @$(logT) obj mempty InfoS "Hello world"@
686-- @$(logT) obj mempty InfoS "Hello world"@
672logT :: ExpQ
687logT :: ExpQ