Git Product home page Git Product logo

co-log-core's Issues

Severity "Success"

I wonder if a constructor Success would be useful for the Severity data type to distinguish critical operations that completed successfully in the log stream. Of course all of this can go into Info, but I feel an extra layer would help.

Green might be a fitting colour, if you're willing to consider this addition.

[RFC] Surface of co-log-core

Our main goal in co-log-core is to create a minimal package with only base in dependencies and enabling more people to use co-log capabilities in a more flexible way.

As proposed by @dcoutts, it might be helpful for other people to:

maximise the ability to use the pattern in different applications by minimising the assumptions

and by moving some parts of co-log-core into co-log.

So let's start a discussion about possible changes in the co-log-core interface.

Minor documentation improvements

  • Fix Haddock with CPP for TypeErrors instance
  • Better docs for cmapMaybe
  • Fix hoistLogAction example of type performPureLogsInIO
  • Better top-level docs for Colog.Core.Action module
  • Typo in cfilterM docs

`WithSeverity`

I find myself wanting this type:

data WithSeverity a = WithSeverity a Severity

i.e. a message tagged with a severity. Then I can do something like this

data Log1 = ...
data Log2 = ALog1 Log1 | ...

adapt :: LogAction m (WithSeverity Log2) -> LogAction m (WithSeverity Log1)
adapt = cmap (fmap ALog1)

Given that co-log-core provides Severity, perhaps it would be nice to provide WithSeverity also?

Severity Trace

It's not uncommon for logging systems to have a level below Debug, often called Trace. I do find this useful: often there's a distinction between "debugging information that's not useful during normal operation" (Debug) and "just vomit out everything" (Trace).

[RFC] Laws property-based tests for `LogAction`

It would be really nice to have tests for the logging functionality, especially property-based testing. However, it's not really clear how to test it. It would be really nice though to have property-based tests for laws for every data type. However, in order to do this, we need to implement the following two pieces:

  • Question 1: Some way to generate arbitrary LogAction
  • Question 2: Some way to compare LogAction

Question 1 is still open. For Question 2: instead of comparing LogActions we can compare results of PureLogger.

We have doctest for unit testing, so this should be enough in terms of unit tests (though, more functions always can be covered with doctest). But having property-based tests for laws would be really good.

Any thoughts are appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.