Hi,
I created a pull request for $subject.
https://github.com/hawkular/hawkular-metrics/pull/352
I'm writing to share some implementation details.
I followed some Hawkular wide conventions (which I gathered from mailing
list threads, so tell me if it's wrong):
- put logging stuff into a 'log' package
- in the message logger interface, method names should start with the
log level [1]
- logger instances should be named 'log' [2]
- only put messages which need an id (level INFO and above) in logger
interfaces [3]
I tried to draw up some Metrics specific conventions (some may not be
specific, I just found no mention of them in the threads):
- group all messages in one class for maintainability [4]
- instead of creating a logger instance in the message logger interface,
use XXXLogging helper class to get a logger instance with proper
category (inspired by what Hibernate does) [5]
- use existing message logger instance to log trace/debug messages
instead of creating a separate logger instance [6]
The logging 'projectCode' is 'HAWKMETRICS'. Does that fit everyone?
Note that until we no longer need to support EAP 6.4, we must not use
primitive arguments in logging interfaces. [7]
Also, logback is now the logging backend for tests. It allows to set log
level with a system property while still having a default value. [8][9]
No Maven filtering/replace dance involved.
If there's no issue with all of the above, then maybe we should not wait
too long before merging, because a bunch of files are impacted.
Thanks,
Thomas
[1]
https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-75a85495...
[2]
https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-26d97c76...
[3]
https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-1354be09...
[4]
https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-75a85495...
[5]
https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-fb0691f5...
[6]
https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-04e1ad2a...
[7]
http://lists.jboss.org/pipermail/hawkular-dev/2015-March/000378.html
[8]
https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-e0d878a7...
[9]
https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-e0d878a7...