-
Notifications
You must be signed in to change notification settings - Fork 4
/
yet-another-logger.cabal
161 lines (145 loc) · 4.45 KB
/
yet-another-logger.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
Cabal-version: 2.4
Name: yet-another-logger
Version: 0.4.2
Synopsis: Yet Another Logger
Description:
A logging framework written with flexibility and performance
in mind.
.
= Quick Start
.
> import System.Logger
>
> main ∷ IO ()
> main = withConsoleLogger Info $ do
> logg Info "moin"
> withLabel ("function", "f") f
> logg Warn "tschüss"
> where
> f = withLevel Debug $ do
> logg Debug "debug f"
.
= Description
.
/This Version is yet a preview/
.
The logging system consists of four main parts:
.
1. The logging front-end are those types and functions that are used
to produce log messages in the code. This includes the 'LogLevel'
type, the 'LogPolicy' type, the 'LogLabel' and 'LogScope' types,
the 'LogFunction' type, and the 'MonadLog' type class.
.
2. The abstract 'LoggerCtx' is the context through which the 'LogFunction'
delivers log messages to the logger back-end.
.
3. The formatter is a function for serializing log messages.
.
4. The logger back-end is a callback that is invoked by 'Logger' on
each log messages. The logger back-end applies the formatting function
and delivers the log messages to some sink.
.
The framework allows to combine this components in a modular way. The
front-end types, the 'Logger', and the back-end callback are represented
by types or type classes. The formatter exists only as a concept
in the implementation of back-ends. These types and concepts together
form the abstract logger interface that is defined in the module
"System.Logger.Types".
.
The package also provides a concrete Logger that implements these components
in the module "System.Logger.Logger" and "System.Logger.Backend.Handle"
Homepage: https://github.com/alephcloud/hs-yet-another-logger
License: Apache-2.0
Author: Lars Kuhtz <[email protected]>
Maintainer: Lars Kuhtz <[email protected]>
Copyright:
Copyright (c) 2016-2023 Lars Kuhtz <[email protected]>
Copyright (c) 2014-2015 PivotCloud, Inc.
Category: Logging, System
Build-type: Simple
License-file: LICENSE
extra-doc-files:
README.md,
CHANGELOG.md
source-repository head
type: git
location: https://github.com/alephcloud/hs-yet-another-logger
flag tbmqueue
description: Use TBMQueue as logger queue. The default is to use TBMChan.
default: False
manual: True
Library
default-language: Haskell2010
hs-source-dirs: src
exposed-modules:
System.Logger
System.Logger.Backend.ColorOption
System.Logger.Backend.Handle
System.Logger.Internal
System.Logger.Internal.Queue
System.Logger.Logger
System.Logger.Logger.Internal
System.Logger.Types
build-depends:
async >= 2.0,
aeson >= 0.11,
ansi-terminal >= 0.6,
base >= 4.8 && < 5.0,
base-unicode-symbols >= 0.2,
bytestring >= 0.10,
clock >= 0.4,
configuration-tools >= 0.2.8,
deepseq >= 1.4,
enclosed-exceptions >= 1.0,
exceptions >= 0.8,
lifted-base >= 0.2.3,
microlens >= 0.4,
monad-control >= 1.0,
mtl >= 2.2,
optparse-applicative >= 0.11,
stm >= 2.4,
stm-chans >= 3.0,
text >= 1.2,
time >= 1.5,
transformers >= 0.3,
transformers-base >= 0.4,
void >= 0.7
ghc-options: -Wall
if flag(tbmqueue)
cpp-options: -DUSE_TBMQUEUE
test-suite tests
type: exitcode-stdio-1.0
default-language: Haskell2010
hs-source-dirs: test
main-is: Main.hs
other-modules:
NoBackend
TastyTools
build-depends:
async >= 2.0,
base >= 4.8 && < 5.0,
base-unicode-symbols >= 0.2,
configuration-tools >= 0.2.12,
enclosed-exceptions >= 1.0,
lifted-base >= 0.2,
microlens >= 0.4,
tagged >= 0.7,
tasty >= 0.10,
tasty-hunit >= 0.9,
text >= 1.2,
transformers >= 0.3,
transformers-base >= 0.4,
void >= 0.7,
yet-another-logger
if !impl(ghc>=7.9)
build-depends:
nats >= 1
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
Executable example
default-language: Haskell2010
hs-source-dirs: example
main-is: Example.hs
build-depends:
base >= 4.8 && < 5.0,
Cabal >= 1.18,
yet-another-logger