Repository navigation
feat(library): make library user implement logging - #29
Merged
Merged
Conversation
sternenseemann
force-pushed
the
user-logging
branch
6 times, most recently
from
January 6, 2021 13:22
16bc735 to
57d2901
Compare
'GopherLogConfig' has now been replaced with a 'GopherLogHandler' which may optionally be provided. This handler is simply an IO action which has the responsibility to log 'GopherLogStr's somewhere the user likes with formatting the user desires. 'LogMessage' has been replaced by a string type again, this time a custom one: 'GopherLogStr' is a wrapper type around a 'Seq' which contains 'Builder's. These builders can be marked as sensitive. Via the 'FromGopherLogStr' type class 'GopherLogStr's can be rendered to the commonly used string types. If a chunk has been marked as sensitive via 'markSensitive' it can be replaced with "[redacted]" by calling hideSensitive. Sensitive chunks are usually IP addresses of connecting clients. The server has been adjusted to use this new API. As an additional benefit we don't allocate a 'TimedFastLogger' anymore if we don't need it (i. e. logHideTime = True).
sternenseemann
force-pushed
the
user-logging
branch
from
January 6, 2021 13:44
39eaba0 to
2c5e089
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
'GopherLogConfig' has now been replaced with a 'GopherLogHandler' which may
optionally be provided. This handler is simply an IO action which has
the responsibility to log 'GopherLogStr's somewhere the user likes with
formatting the user desires.
'LogMessage' has been replaced by a string type again, this time a
custom one: 'GopherLogStr' is a wrapper type around a 'Seq' which
contains 'Builder's. These builders can be marked as sensitive. Via the
'FromGopherLogStr' type class 'GopherLogStr's can be rendered to the
commonly used string types. If a chunk has been marked as sensitive via
'markSensitive' it can be replaced with "[redacted]" by calling
hideSensitive. Sensitive chunks are usually IP addresses of connecting
clients.
The server has been adjusted to use this new API. As an additional
benefit we don't allocate a 'TimedFastLogger' anymore if we don't need
it (i. e. logHideTime = True).
Resolves #24.
To do:
Network.Gopher.Log