co-log-polysemy: Composable Contravariant Comonadic Logging Library

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

Warnings:

Implementation of the co-log logging based on the polysemy extensible effects library.

The ideas behind this package are described in the following blog post:

For the taggless final implementation of the co-log ideas se the following package:


[Skip to ReadMe]

Properties

Versions0.0.0.0, 0.0.0.0
Change logCHANGELOG.md
Dependenciesbase (>=4.10.0.0 && <4.13), co-log-core (>=0.2.0.0 && <0.3), co-log-polysemy, polysemy (>=0.1.2.0 && <0.2) [details]
LicenseMPL-2.0
Copyright2019 Kowainik
AuthorDmitrii Kovanikov
MaintainerKowainik <xrom.xkov@gmail.com>
CategoryLogging, Contravariant, Comonad, Effects
Home pagehttps://github.com/kowainik/co-log
Bug trackerhttps://github.com/kowainik/co-log/issues
Source repositoryhead: git clone https://github.com/kowainik/co-log.git
Executablesplay-colog-poly
UploadedSun May 5 13:40:24 UTC 2019 by shersh

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for co-log-polysemy-0.0.0.0

[back to package description]

co-log

MPL-2.0 license Build status

| | | | | | :------------ | :--------------------------------- | :---------------------------------------- | :---------------------------------------------------- | | co-log-core | Hackage | Stackage LTS | Stackage Nightly | | co-log | Hackage | Stackage LTS | Stackage Nightly | | co-log-polysemy | Hackage | Stackage LTS | Stackage Nightly |

co-log is a composable and configurable logging framework. The idea of the approach is described in the following blog post:

The repository contains the following packages:

See the following tutorial series about the library:

Benchmarks

co-log is compared with basic functions like putStrLn. Since IO overhead is big enough, every benchmark dumps 10K messages to output. If benchmark name doesn't contain Message then this benchmark simply dumps string "message" to output, otherwise it works with Message data type from the co-log library.

| Benchmarks | Time for 10K messages | | :------------------------------------------------------ | :-------------------- | | Prelude.putStrLn | 5.117ms | | Text.putStrLn | 9.220ms | | ByteString.putStrLn | 2.971ms | | mempty | 1.181ms | | logStringStdout | 5.107ms | | logPrint | 5.248ms | | logTextStdout | 5.351ms | | logByteStringStdout | 2.933ms | | logByteStringStderr | 17.482ms | | ByteString > (stdout <> stderr) | 17.715ms | | Message > format > stdout | 9.188ms | | Message > format > ByteString > stdout | 3.524ms | | Message{callstack} > format > stdout | 9.139ms | | Message{callstack:5} > format > stdout | 9.464ms | | Message{callstack:50} > format > stdout | 9.439ms | | Message{Time,ThreadId} > format > stdout | 54.160ms | | Message{Time,ThreadId} > format > ByteString > stdout | 54.137ms |