MPL-2.0 licensed by Dmitrii Kovanikov
Maintained by Kowainik
This version can be pinned in stack with:co-log-core-0.3.2.2@sha256:42846149b80c4d7b4c94d229bd156f33fb41dae4e4b2ed8f929647a9316894dd,4070

Module documentation for 0.3.2.2

co-log-core

Co-logo

GitHub CI Hackage MPL-2.0 license

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:

  1. 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
    
  2. 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.2 — May 21, 2024

What’s Changed

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

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

  • #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

  • #38: Rename cbind to cmapM.

  • #37: Add base bounds.

0.0.0

  • Initially created.