Repository navigation
Group exceptions/messages - #30
ColinHebert wants to merge 2 commits into
Conversation
|
22 days behind here, but we can probably just remove checksums altogether. Most of the clients now leave it up to the server (which IMO is ideal) to generate the checksum in the best way possible. |
|
I'm not so sure that the default checksum would be great. In Java exception messages tend to contain some details about the exception itself, this means that for one unique exception you can end up with different checksums. Generating the checksum manually on the other hand allows to ensure that two exceptions with the same stacktrace have the same checksum. Whether the message is the same or not. I think that leaving the checksum generation to the server is useful only when your log messages are always strictly the same, this is not the case in Java at all. |
Default on the message if the checksumContent isn't provided
Exceptions are now grouped by stacktrace content which should be more relevant than exception messages Simple logs are grouped by locationInformation (line where the log was done) if available, message otherwise.
|
Rebased the commits on the latest version of refactoring (If you remove the refactoring branch, I'll reopen a pull request on master) |
|
Would allowing this as an option be a good solution? |
|
Just to make it clear the stack trace includes the message. Here is an example: This means that you end up with a separate checksum for each URI that fails in this example even if the stack trace is the same. You can't sensibly do this on the server as by that point it's not simple to separate the message from the rest of the stack trace as it all comes across in one field. |
|
Not really, only the stackframes are used (classname, method, line), not the name of the exception nor the message, see here |
|
In the patch only the frames are used but attempting todo stacktrace checksuming on the server means you have to be able to strip off the message, because by then the stacktrace and the message are merged. |
|
Realistically the message should not be part of the stacktrace, but it seems that it ends up there. As long as that's not true, then the server will correctly handle sanitizing the stacktrace and doing the checksum correctly. |
|
Guys, thanks for the input. I haven't had a close look at the code, but I'm guessing the remaining problems could be resolved if we can clear out issue #43. Whether the ability to calculate your own checksum is absolutely crucial... I don't know. Maybe it would be useful for logging levels other than error. E.g. @ColinHebert if you could rebase this on master, that would be great. |
|
hum, I'll have to open a new pull request I suppose as this pull request is made for the refactoring branch: See #44 |
This is a follow-up for #28:
Exceptions in log4j are now grouped by stacktrace content which should be more relevant than exception messages
Simple logs in log4j are grouped by locationInformation (line where the log was done) if available, message content otherwise.
This is a quick and dirty fix, for the issue #28 and may require more thoughts, but still it works nicely.