[Hawkular-dev] [Metrics] HWKMETRICS-125 Use JBoss Logging as in all other Hawkular components

Heiko W.Rupp hrupp at redhat.com
Wed Sep 16 05:29:39 EDT 2015


That looks sound to me.

If that is agreed upon, your writeup could also be put into
http://www.hawkular.org/docs/dev/development.html#_code_style
to enhance the current short bullet point.

   Heiko


On 16 Sep 2015, at 10:58, Thomas Segismont wrote:

> 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-75a8549533d503e0f032038ff7442e06R63
> [2]
> https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-26d97c7615667d28c50de926537fd343R35
> [3]
> https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-1354be094ca909a30eedafc9fdf8fc1fR70
>
> [4]
> https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-75a8549533d503e0f032038ff7442e06R39
> [5]
> https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-fb0691f5bb1e1793a11ed3f20a3fb6d2R28
> [6]
> https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-04e1ad2ad2cadc473893730a61b3e271R607
>
>
> [7] 
> http://lists.jboss.org/pipermail/hawkular-dev/2015-March/000378.html
>
> [8]
> https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-e0d878a774dafba50428080c38a192b8R24
> [9]
> https://github.com/hawkular/hawkular-metrics/pull/352/files#diff-e0d878a774dafba50428080c38a192b8R33
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev



More information about the hawkular-dev mailing list