co-log-core
Composable Contravariant Comonadic Logging Library
https://github.com/co-log/co-log-core
LTS Haskell 23.14: | 0.3.2.5 |
Stackage Nightly 2025-03-16: | 0.3.2.5 |
Latest on Hackage: | 0.3.2.5 |
co-log-core-0.3.2.5@sha256:f91280b3b28cde44e29c576c9b11a0b4be8cbe3eaa9c571ecc1c53068d3330d2,4087
Module documentation for 0.3.2.5
co-log-core
co-log-core
is a lightweight package that provides core types and functions to
work with the @LogAction@ data type which is both simple and powerful.
How to use
co-log-core
is compatible with the following GHC
versions - supported versions
In order to start using co-log-core
in your project, you
will need to set it up with these steps:
-
Add the dependency on
co-log-core
in your project’s.cabal
file. For this, you should modify thebuild-depends
section according to the below section:build-depends: base ^>= LATEST_SUPPORTED_BASE , co-log-core ^>= LATEST_VERSION
-
To use this package, refer to the below example.
module Main (main) where import Prelude hiding (log) import Colog.Core (LogAction, logStringStdout, (<&)) app :: LogAction IO String -> IO () app log = do log <& "Starting app..." log <& "Finishing app..." main :: IO () main = app logStringStdout
Changes
Change log
co-log-core
uses PVP Versioning.
The change log is available on GitHub.
0.3.2.5 — March 2, 2025
What’s Changed
- Allow
doctest-0.24
.
Full Changelog: https://github.com/co-log/co-log-core/compare/v0.3.2.4...v0.3.2.5
0.3.2.4 — January 5, 2025
What’s Changed
- Support ghc-9.12.
Full Changelog: https://github.com/co-log/co-log-core/compare/v0.3.2.3...v0.3.2.4
0.3.2.3 — December 15, 2024
What’s Changed
- Allow
doctest-0.23
.
Full Changelog: https://github.com/co-log/co-log-core/compare/v0.3.2.2...v0.3.2.3
0.3.2.2 — May 21, 2024
What’s Changed
- GA(deps): Bump actions/cache from 3 to 4 by @dependabot in https://github.com/co-log/co-log-core/pull/40
- Support ghc-9.10. by @alaendle in https://github.com/co-log/co-log-core/pull/41
Full Changelog: https://github.com/co-log/co-log-core/compare/v0.3.2.1...v0.3.2.2
0.3.2.1 — Oct 20, 2023
What’s Changed
- Relax doctest boundaries. by @alaendle in #32
- GA(deps): Bump actions/checkout from 3 to 4 by @dependabot in #35
- Allow doctest-0.22 by @Vekhir in #36
- [#29] Support GHC 9.6 by @vrom911 in #33
- Support ghc-9.8 by @alaendle in #37
- Publish to hackage directly from GitHub by @alaendle in #38
New Contributors
- @Vekhir made their first contribution in https://github.com/co-log/co-log-core/pull/36
Full Changelog: https://github.com/co-log/co-log-core/compare/v0.3.2.0...v0.3.2.1
0.3.2.0 — Nov 2, 2022
- #25: Support GHC-9.4.
0.3.1.0 — Feb 15, 2022
🎃 0.3.0.0 — Oct 29, 2021
-
#223: Support GHC-9.0.1.
-
#176: Add
logFlush
action to flush the givenHandle
.Breaking change: All
withLog*File
functions how flush handle after logging each message. Now you’ll see logs in the file immediately.Migration guide: If you rely on the previous behaviour, then copy-paste corresponding functions and remove flushing.
-
Update maintainers information to the new Co-Log organization.
0.2.1.1 — Apr 18, 2020
- #186: Support GHC-8.10.1.
0.2.1.0 — Jan 19, 2020
- #139:
Add (unrepresentable)
Functor
instance forLogAction
with the custom type-error. (by @vrom911) - #148: Support GHC-8.8.2. (by @chshersh)
- #122:
Add the
separate
combinator. (by @vrom911) - #125: Add monadic versions of contravariant functions. (by @piq9117)
- #138:
Add
hoistLogAction
— higher-order transformation function. (by @jiribenes) - #123:
Write default implementation to
getLogAction
vialogActionL
. (by @SanchayanMaity)
0.2.0.0 — May 5, 2019
- #85:
Move
overLogAction
toHasLog
typeclass - #101:
Add
logActionL
lens with default implementation toHasLog
type class. - #99:
Add comonadic combinators:
duplicate
andmultiplicate
. - #78: Improve documentation significantly.
0.1.1 — Nov 15, 2018
- #63:
Add
logPrint
,logPrintStderr
,logPrintHandle
andwithLogPrintFile
toColog.Core.IO
. - #46:
Moves
logStringStdout
,logStringStderr
,logStringHandle
,withLogStringFile
fromColog.Actions
toColog.Core.IO
. - #48:
Adds
liftLogIO
function. - #49:
Add
<&
and&>
operators forunLogAction
. - #47:
Add
doctest
tests. - #13:
Add
.cabal
file description and improve documentation. - #39: Support GHC-8.2.2 and GHC-8.6.2.
0.1.0
0.0.0
- Initially created.