di
Typeful hierarchical structured logging using di, mtl and df1.
LTS Haskell 22.43: | 1.3 |
Stackage Nightly 2024-12-05: | 1.3 |
Latest on Hackage: | 1.3 |
di-1.3@sha256:8e630a6ac40f234fbd39627841d3cfd3800e2189b63c1ee01cf5290eb0138131,1129
Module documentation for 1.3
di
Typeful hierarchical structured logging using di, mtl and df1.
This is meta-package bringing in together things from the di-core
,
di-monad
, di-handle
and di-df1
libraries.
See the Di
module for more documentation.
See the BSD3 LICENSE file to learn about the legal terms and conditions for this library.
Changes
Version 1.3
-
COMPILER ASSISTED BREAKING CHANGE: Renaming logging functions again. For example,
info
is the name we give to theToMessage
-polymorphic logging functions,info_
to theirMessage
-monomorphic version, andinfo'
to theSTM
version. The previousSTM
suffix ininfoSTM
is gone, so as to mimick the naming conventions ofdi-core
. -
Re-export
attr_
fromDi.Df1.Monad
. -
Re-export all of
MonadDi(..)
fromDi.Df1.Monad
.
Version 1.2.2
- Re-export
ask
fromDi.Df1.Monad
.
Version 1.2.1
-
Improve logging of exceptions.
-
Documentation improvements.
-
Re-export
debug'
,info'
, etc. fromDi.Df1.Monad
.
Version 1.2
-
The
MonadThrow
instance forDiT
doesn’t log exceptions automatically any more. This is because otherwise catching and re-throwing exceptions in downstream code, by default, ends up logging the same exception more than once. -
A
throw
function behaving as the previousMonadThrow
instance was introduced.
Version 1.1.1
-
Documentation improvements.
-
Re-export
Df1.ToSegment
,Df1.segment
,Df1.ToMessage
,Df1.message
,Df1.ToKey
,Df1.key
,Df1.ToValue
,Df1.value
.
Version 1.1
- BREAKING CHANGE: Exceptions are now logged at the throw site by
default now when possible, with level
Warning
. See the changelog fordi-monad-1.1
.
Version 1.0.1
-
COMPILER ASSISTED BREAKING CHANGE: We don’t export
Di
,DiT
norMonadDi
anymore. -
Re-export
Df1.Path
,Df1.Level
,Di.Df1.Df1
,Di.Df1.Monad.Df1T
,Di.Df1.Monad.MonadDf1
.
Version 1.0
- BREAKING CHANGE: Most of what used to be in this library lives now in
di-core
. This library is now intended to be an entry point to the variousdi-*
libraries. Consider this first release of the new ecosystem a preview release: The API is likely to stay stable, but extensive testing, formalization and tooling is due.
Version 0.3
-
BREAKING CHANGE:
mkDiTextStderr
andmkDiStringHandle
return aDi String [String] String
now. -
Made compatible with GHC 8.4.
Version 0.2
-
BREAKING CHANGE:
Di
now takes a new type argumentlevel
. -
BREAKING CHANGE: Remove
Level
and all related functions in favour of a newlevel
argument toDi
to be implemented by the user. -
BREAKING CHANGE: Require
Monoid
instance for thepath
type. -
BREAKING CHANGE: Removed
level
function. Addedfilter
function instead. -
BREAKING CHANGE: Drop
mkDiTextStderr
andmkDiTextFileHandle
in favour ofmkDiStringHandle
andmkDiStringStderr
. The rationale is that we are already paying the costs of manyshow
calls, and users of this library are quite likely to useString
s anyway (since they, too, are likely usingshow
results). We will bring backText
basedmkDiTextStderr
when we can make it performant. -
BREAKING CHANGE: Rename the
path
andmsg
functions tocontrapath
andcontramsg
, flipping the order of their arguments so that the function comes first (like incontramap
). -
BREAKING CHANGE: The
push
function now takes theDi
value as second argument. -
Fix ISO8601 formatting of second fractions.
-
Export
flush
. -
Stricter ordering of async messages.
-
Added tests.
-
Added a lot of documentation.
Version 0.1
- Initial version.