-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging concept #106
Closed
Closed
Logging concept #106
Conversation
This file contains 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
…(without decorating the instance with a logger or something like that). The creation of Instrumenter in Coverage class is done using the static Instrumenter factory. Still no functionality has changed
… of the instrumenter
…ll registered decorators. Added EnableLogging method that registers the logging decorator to the InstrumenterFactory
…rbositiy is true.
Codecov Report
@@ Coverage Diff @@
## master #106 +/- ##
=========================================
Coverage ? 98.93%
=========================================
Files ? 20
Lines ? 1413
Branches ? 0
=========================================
Hits ? 1398
Misses ? 15
Partials ? 0
Continue to review full report at Codecov.
|
@coenm will take a look at this |
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.
Since version 2.0 I have an issue with a project running on Linux where coverage is not calculated (#72 and #107) . Running on Windows doesn't have any problems. My problem is that it is pretty hard to do investigation on Travis and why my project isnt covered.
Would it be nice if you can enable logging in order to give the user the ability to do a first investigation (and maybe fix and send a PR) before adding an issue.
First of all, I dislike lines like
logger.Log("bla bla");
through all production code at all kind of places. IMO too much of these lines blur the original intention of the code.This PR is a starting point of how logging can be inplemented. Hopefully, you all see the value of logging and we can have a discussion about this.
The logging is done by decorating classes with a
LoggingDecorator
.Please note that the original code was extended (decorated) and hardly touched. Only the creation of
Instrumenter
is now done using a factory, and theInstrumenter
class now implements an interface.If you like this idea, I'm willing to take this further
BTW, I don't expect this PR to be accepted as is right now as it doesn't add real value at this point.
I just didn't want to put too much effort in this without knowing what the you think about logging and about this concept.