co-log / co-log-core Goto Github PK
View Code? Open in Web Editor NEW๐ฝ Core types and functions that power the Haskell `co-log` implementation
License: Mozilla Public License 2.0
๐ฝ Core types and functions that power the Haskell `co-log` implementation
License: Mozilla Public License 2.0
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.
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.
cmapMaybe
hoistLogAction
example of type performPureLogsInIO
Colog.Core.Action
modulecfilterM
docsWould be nice to support this version such that Stackage could upgrade
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?
Current README duplicates previous co-log
README. Ideally, we want to see here something like in the following README of prolens
with a short description and simple usage.
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).
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:
LogAction
LogAction
Question 1 is still open. For Question 2: instead of comparing LogAction
s 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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.