yet-another-logger: Yet Another Logger
A logging framework written with flexibility and performance in mind.
Quick Start
import System.Logger main ∷ IO () main = withConsoleLogger Info $ do logg Info "moin" withLabel ("function", "f") f logg Warn "tschüss" where f = withLevel Debug $ do logg Debug "debug f"
Description
This Version is yet a preview
The logging system consists of four main parts:
The logging front-end are those types and functions that are used to produce log messages in the code. This includes the
LogLevel
type, theLogPolicy
type, theLogLabel
andLogScope
types, theLogFunction
type, and theMonadLog
type class.The abstract
LoggerCtx
is the context through which theLogFunction
delivers log messages to the logger back-end.The formatter is a function for serializing log messages.
The logger back-end is a callback that is invoked by
Logger
on each log messages. The logger back-end applies the formatting function and delivers the log messages to some sink.
The framework allows to combine this components in a modular way. The
front-end types, the Logger
, and the back-end callback are represented
by types or type classes. The formatter exists only as a concept
in the implementation of back-ends. These types and concepts together
form the abstract logger interface that is defined in the module
System.Logger.Types.
The package also provides a concrete Logger that implements these components in the module System.Logger.Logger and System.Logger.Backend.Handle
[Skip to Readme]
Modules
[Index] [Quick Jump]
Flags
Manual Flags
Name | Description | Default |
---|---|---|
tbmqueue | Use TBMQueue as logger queue. The default is to use TBMChan. | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- yet-another-logger-0.4.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Versions [RSS] | 0.0.1, 0.1, 0.1.1, 0.1.1.1, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.3.1, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.4.2 |
---|---|
Change log | CHANGELOG.md |
Dependencies | aeson (>=0.11), ansi-terminal (>=0.6), async (>=2.0), base (>=4.8 && <5.0), base-unicode-symbols (>=0.2), bytestring (>=0.10), Cabal (>=1.18), clock (>=0.4), configuration-tools (>=0.2.8), deepseq (>=1.4), enclosed-exceptions (>=1.0), exceptions (>=0.8), lifted-base (>=0.2.3), microlens (>=0.4), monad-control (>=1.0), mtl (>=2.2), optparse-applicative (>=0.11), stm (>=2.4), stm-chans (>=3.0), text (>=1.2), time (>=1.5), transformers (>=0.3), transformers-base (>=0.4), void (>=0.7), yet-another-logger [details] |
License | Apache-2.0 |
Copyright | Copyright (c) 2016-2023 Lars Kuhtz <lakuhtz@gmail.com> Copyright (c) 2014-2015 PivotCloud, Inc. |
Author | Lars Kuhtz <lakuhtz@gmail.com> |
Maintainer | Lars Kuhtz <lakuhtz@gmail.com> |
Category | Logging, System |
Home page | https://github.com/alephcloud/hs-yet-another-logger |
Source repo | head: git clone https://github.com/alephcloud/hs-yet-another-logger |
Uploaded | by larsk at 2023-06-23T21:06:18Z |
Distributions | NixOS:0.4.2 |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Executables | example |
Downloads | 8968 total (64 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2023-06-23 [all 1 reports] |