GitHub user lzh3636 opened a pull request:
https://github.com/apache/wicket/pull/285
Improve some logging statements
There are two changes made in this pull request to improve some logging
statements
1: There is a possible copy and paste errors in the log messages (The
logging statement was copied from an old place to a new place, but the message
wasn't changed to adapt to the function of the new place) which may cause
confusion when operators are reading the log messages.
**org.apache.wicket.pageStore.AsynchronousPageStore.storePage
org.apache.wicket.pageStore.AsynchronousDataStore.storeData**
In the above two classes, there are two identical logging statements:
`log.debug("Storing synchronously page with id '{}' in session '{}'", id,
sessionId);`
While in AsynchronousDataStore.storeData the code is dealing with **data**
rather than **page**, so I changed the message from page to data.
2. In **org.apache.wicket.core.util.lang.PropertyResolver.findSetter**,
different exception types are caught, but the logging messages are the same and
there's no stack trace. So people cannot know what exception happened here and
cannot distinguish if the exception type is NoSuchMethodException or just
general Exception. Simply adding a full stack trace is able to improve it.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/lzh3636/wicket logging-improvement
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/wicket/pull/285.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #285
----
commit c6c19c8dc98ff9082e39324f45aad6357b08a9ad
Author: zhenhaoli <lizi422@...>
Date: 2018-07-23T15:17:17Z
Improve some logging statements
commit 60495ee522e8f14fb93b3e9aaca53f3434766aef
Author: zhenhaoli <lizi422@...>
Date: 2018-07-23T15:18:30Z
Improve some logging statements
----
---