MPL-2.0 licensed by Dmitrii Kovanikov
This version can be pinned in stack with:co-log-core-0.3.2.0@sha256:9b2699adecee2f072b6c713089e675b592ef23f00a2ff3740bdaf4d87de8d456,3850
Module documentation for 0.3.2.0
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 the build-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
Change log
co-log-core
uses PVP Versioning.
The change log is available on GitHub.
0.3.2.0 — Nov 2, 2022
0.3.1.0 — Feb 15, 2022
- #7:
Support GHC-9.2.
- #13:
Add
WithSeverity
and mapSeverity
to Colog.Severity
.
🎃 0.3.0.0 — Oct 29, 2021
-
#223:
Support GHC-9.0.1.
-
#176:
Add logFlush
action to flush the given Handle
.
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 for LogAction
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
via logActionL
.
(by @SanchayanMaity)
0.2.0.0 — May 5, 2019
- #85:
Move
overLogAction
to HasLog
typeclass
- #101:
Add
logActionL
lens with default implementation to HasLog
type class.
- #99:
Add comonadic combinators:
duplicate
and multiplicate
.
- #78:
Improve documentation significantly.
0.1.1 — Nov 15, 2018
- #63:
Add
logPrint
, logPrintStderr
, logPrintHandle
and withLogPrintFile
to Colog.Core.IO
.
- #46:
Moves
logStringStdout
, logStringStderr
, logStringHandle
,
withLogStringFile
from Colog.Actions
to Colog.Core.IO
.
- #48:
Adds
liftLogIO
function.
- #49:
Add
<&
and &>
operators for unLogAction
.
- #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