@@ -141,6 +141,27 @@ This module also contains a module-per-type with lenses for that type. The
141141lenses follow the same format as [ Aether] ( https://github.com/xyncro/aether )
142142recommends.
143143
144+ ### ` logibit.hawk.Logging `
145+
146+ Types:
147+
148+ - ` LogLevel ` - the level of the LogLine.
149+ - ` LogLine ` - this is the data structure of the logging module, this is where
150+ you feed your data.
151+ - ` Logger interface ` - the main interface that we can log to/into.
152+ - ` Logger module ` - a module that contains functions equiv. to the instance
153+ methods of the logger interface.
154+ - ` NoopLogger : Logger ` - the default logger, you have to replace it yourself
155+
156+ It's good to know that you have to construct your LogLine yourself. That
157+ LogLines with Verbose or Debug levels should be sent to the ` debug ` or ` verbose `
158+ functions/methods of the module/interface Logger, which in turn takes functions,
159+ which are evaluated if it's the case that the logging infrastructure is indeed
160+ logging at that level.
161+
162+ This means that logging at that level, and computing the log lines, needs only
163+ be done if we can really do something with them.
164+
144165### ` logibit.hawk.Choice `
145166
146167This module adds some functions for composing Choice-s:
@@ -184,13 +205,5 @@ There are some modules that are currently internal as to avoid conflicting with
184205existing code. If these are made 'more coherent' or else moved to external
185206libraries, they can be placed on their own and be made public. The modules like this are ` Random ` , ` Prelude ` , ` Parse ` .
186207
187- There's a cut at a logging abstraction - however, with the types used in this library,
188- it's not that much need for logging - the types include all the needed info and
189- adding logging in the wrong place can open the code up to differential attacks.
190-
191- When the Logging abstraction is being used, it would be prudent to open up the
192- required configuration point and possible use the interface in the
193- ` Settings<'a> ` type. Until then, the module is internal.
194-
195208[ ng-h ] : https://www.nuget.org/packages/Hawk/
196209[ ng-hs ] : https://www.nuget.org/packages/Hawk.Suave/
0 commit comments