Add ability to log exceptions as error.#235
Conversation
This chage does not break backwords compatibility.
|
Please help. The appVeyor check failed because maven path was set windows style. I have not checked in anything to change build platform/OS |
|
@fandfisf Let me find a reviewer for this pull request, thanks for submitting it |
|
@original-brownbear please review this PR |
| new MethodLogger.Marker(point, annotation); | ||
| this.running.add(marker); | ||
| int level = annotation.value(); | ||
| final int exceptionLevel = this.decideExceptionLevel(annotation); |
There was a problem hiding this comment.
@fandfisf we don't generally use compound method variable names, let's just leave this as level :)
| */ | ||
| private int decideExceptionLevel(final Loggable annotation) { | ||
| int returnValue = annotation.value(); | ||
| if (annotation.exceptionsAsError()) { |
There was a problem hiding this comment.
@fandfisf very minor but you got two spaces behind the = here, let's fix the formatting and make it just one space :)
There was a problem hiding this comment.
Is this before the "Loggable.ERROR"? Will fix that most likely this week-end.
|
@fandfisf thanks for the contribution. Removing that pid file def makes sense I think :) Only two minor points from my end. |
|
Will create an issue and will link to the PR description as you suggest. By the way, what is |
|
Created issue #236 |
|
Any update on this? |
|
@rultor merge |
@fandfisf @yegor256 Oops, I failed. You can see the full log here (spent 5min) |
|
@rultor merge |
@fandfisf @yegor256 Oops, I failed. You can see the full log here (spent 7min) |
|
@rultor merge |
@fandfisf @yegor256 Oops, I failed. You can see the full log here (spent 8min) |
|
@fandfisf it seems that your code is not "clean" enough. Please, run your branch with |
See issue #236
This chage does not break backwords compatibility. The most common case is to log entry/exit at either INFO or DEBUG level, however, exceptions are usually logged as "ERROR". This allows the default behaviour to remain unchanged (exceptions logged at the same level as entry and exit) however for code-bases that do not use exceptions for flow control but as real exceptions, it allows them to be logged as ERROR. Hope this helps.
I also deleted a "pid" file in the root as it looked like an accidental check in. Pease discard the change if that is no the case.
Thanks!