co-log-polysemy-formatting 0.1.0.0 → 0.1.1.0
raw patch · 9 files changed
+20/−13 lines, 9 filesdep ~polysemyPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: polysemy
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- co-log-polysemy-formatting.cabal +6/−6
- example/Main.hs +3/−1
- src/Colog/Polysemy/Formatting.hs +2/−0
- src/Colog/Polysemy/Formatting/Color.hs +1/−1
- src/Colog/Polysemy/Formatting/LogEnv.hs +1/−2
- src/Colog/Polysemy/Formatting/Render.hs +1/−1
- src/Colog/Polysemy/Formatting/ThreadTimeMessage.hs +1/−1
- src/Colog/Polysemy/Formatting/WithLog.hs +1/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for co-log-polysemy-formatting +## 0.1.1.0 -- 2020-12-10++* Relax polysemy version bounds to work with polysemy-1.5+ ## 0.1.0.0 -- 2020-10-12 * First version. Released on an unsuspecting world.
co-log-polysemy-formatting.cabal view
@@ -1,9 +1,9 @@ cabal-version: 2.4 name: co-log-polysemy-formatting-version: 0.1.0.0+version: 0.1.1.0 synopsis: A Polysemy logging effect for high quality (unstructured) logs. description: co-log-polysemy-formatting builds on the co-log-polysemy package, adding terminal colours, log severity, timestamps, callers, thread ids, and a flexible log format with good defaults. It also allows you to use the formatting library for formatting your log messages.-homepage: https://github.com/AJChapman/co-log-polysemy-formatting/README.md+homepage: https://github.com/AJChapman/co-log-polysemy-formatting#readme bug-reports: https://github.com/AJChapman/co-log-polysemy-formatting/issues license: BSD-3-Clause license-file: LICENSE@@ -21,14 +21,11 @@ common deps build-depends: base >= 4.11.0.0 && < 5- , ansi-terminal ^>= 0.10.3 , co-log ^>= 0.4.0.1 , co-log-core ^>= 0.2.1.1 , co-log-polysemy ^>= 0.0.1.1 , formatting ^>= 7.1.0- , polysemy ^>= 1.3.0.0- , text >= 0.11.0.8 && < 1.3- , time >= 1.8.0.2 && < 1.10+ , polysemy >= 1.3.0.0 && < 1.6 -- Warnings list list taken from -- https://medium.com/mercury-bank/enable-all-the-warnings-a0517bc081c3@@ -55,6 +52,9 @@ import: deps hs-source-dirs: src default-language: Haskell2010+ build-depends: ansi-terminal ^>= 0.10.3+ , text >= 0.11.0.8 && < 1.3+ , time >= 1.8.0.2 && < 1.10 exposed-modules: Colog.Polysemy.Formatting Colog.Polysemy.Formatting.Color Colog.Polysemy.Formatting.LogEnv
example/Main.hs view
@@ -33,7 +33,8 @@ -- Set the level of logging we want (for more control see 'filterLogs') & setLogLevel Debug - -- This lets us log the thread id and message timestamp with each log message+ -- This lets us log the thread id and message timestamp with each log message.+ -- It transforms the 'Log Message' effect into a 'Log ThreadTimeMessage' effect. & addThreadAndTimeToLog -- If you are using the 'Async' effect then interpret it here, after adding the thread and time,@@ -45,6 +46,7 @@ & runM +-- The 'WithLog r' constraint expands to '(HasCallStack, Member (Log Message) r)' program :: (WithLog r, Members '[Async, Embed IO] r) => Sem r () program = do -- This concurrency is just here to demonstrate that it is possible.
src/Colog/Polysemy/Formatting.hs view
@@ -63,6 +63,7 @@ -- > & setLogLevel Debug -- > -- > -- This lets us log the thread id and message timestamp with each log message+-- > -- It transforms the 'Log Message' effect into a 'Log ThreadTimeMessage' effect. -- > & addThreadAndTimeToLog -- > -- > -- If you are using the 'Async' effect then interpret it here, after adding the thread and time,@@ -74,6 +75,7 @@ -- > -- > & runM -- >+-- > -- The 'WithLog r' constraint expands to '(HasCallStack, Member (Log Message) r)' -- > program :: (WithLog r, Members '[Async, Embed IO] r) => Sem r () -- > program = do -- > -- This concurrency is just here to demonstrate that it is possible.
src/Colog/Polysemy/Formatting/Color.hs view
@@ -2,7 +2,7 @@ {-| Module : Colog.Polysemy.Formatting.Color Description : Terminal colour support for log messages.-|-}+-} module Colog.Polysemy.Formatting.Color ( Color(..) , UseColor(..)
src/Colog/Polysemy/Formatting/LogEnv.hs view
@@ -1,8 +1,7 @@ {-| Module : Colog.Polysemy.Formatting.LogEnv Description : The 'LogEnv' datatype, to describe the logging environment.--|-}+-} module Colog.Polysemy.Formatting.LogEnv ( LogEnv(..) , newLogEnv
src/Colog/Polysemy/Formatting/Render.hs view
@@ -4,7 +4,7 @@ {-| Module : Colog.Polysemy.Formatting.Render Description : Render log messages.-|-}+-} module Colog.Polysemy.Formatting.Render ( renderThreadTimeMessage , renderThreadTimeMessageShort
src/Colog/Polysemy/Formatting/ThreadTimeMessage.hs view
@@ -11,7 +11,7 @@ {-| Module : Colog.Polysemy.Formatting.ThreadTimeMessage Description : A message type that includes ThreadId and a timestamp, wrapping a 'Message'.-|-}+-} module Colog.Polysemy.Formatting.ThreadTimeMessage ( ThreadTimeMessage(..) , HasSeverity(..)
src/Colog/Polysemy/Formatting/WithLog.hs view
@@ -8,7 +8,7 @@ {-| Module : Colog.Polysemy.Formatting.WithLog Description : A constraint for adding the logging effect.-|-}+-} module Colog.Polysemy.Formatting.WithLog ( WithLog' , WithLog