logging: Simplified logging in IO for application writers.
logging
is a wrapper around monad-logger
and fast-logger
which makes
it easy to log from any MonadLogger
environment, or from IO
. It
provides the following conveniences on top of those libraries:
A
MonadLogger
instance forIO
. Usually this is bad for libraries, but can be very convenience for application writers who know they always want to log from IO to the console. If you need to log to other sources, or to make logging compile-time optional, usemonad-logger
directly.A set of shorter functions to type:
debug
,log
,warn
.Logging variants of
error
,trace
andtraceShow
, callederrorL
,traceL
andtraceShowL
. These useunsafePerformIO
in order to act as direct replacements, so the usual caveats apply.A global function,
setDebugLevel
, which uses a globalIORef
to record the logging level, saving you from having to carry around the notion of "verbosity level" in a Reader environment.A set of "timed" variants,
timedLog
andtimedDebug
, which report how long the specified action took to execute in wall-clock time.
Downloads
- logging-1.1.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.4.1, 2.1.0, 2.2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6 |
---|---|
Dependencies | base (>=3 && <5), binary (>=0.5.1.1), bytestring (>=0.9.2.1), fast-logger (>=2.1.5), lifted-base (>=0.2.2.0), monad-control (>=0.3.2.3), monad-logger (>=0.3.4.0), old-locale (>=1.0.0.5), text (>=0.11.3.1), thyme (>=0.3.1.0), transformers (>=0.3.0.0), vector-space (>=0.8.6) [details] |
License | MIT |
Author | John Wiegley |
Maintainer | johnw@newartisans.com |
Category | System |
Source repo | head: git clone git://github.com/jwiegley/logging.git |
Uploaded | by JohnWiegley at 2014-04-02T21:20:18Z |
Distributions | LTSHaskell:3.0.6, NixOS:3.0.5, Stackage:3.0.6 |
Reverse Dependencies | 7 direct, 0 indirect [details] |
Downloads | 11460 total (7 in the last 30 days) |
Rating | 2.0 (votes: 1) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Successful builds reported [all 1 reports] |