[infinispan-dev] Event log

Sanne Grinovero sanne at infinispan.org
Fri Nov 13 12:02:56 EST 2015


On 13 November 2015 at 15:28, Tristan Tarrant <ttarrant at redhat.com> wrote:
> On 13/11/2015 15:53, Dan Berindei wrote:
>>
>>
>> Tristan, can the users configure WildFly/Infinispan Server to use
>> another logging service instead of Log4J2? If yes, perhaps
>> implementing this functionality with custom appenders is not a good
>> idea...
>
> The WildFly logging goes through the lgoging subsystem which is built on
> top of jboss-logging with direct support for wrapping to log4j 1.2.x
> (not log4j2). You can plugin additional handlers [1], but you cannot
> really change the underlying implementation. I'll ping James Perkins and
> ask him about the details.

Why bind this to log4j(2) ? Just write a JBoss-Logging backend, it's
easier and can wrap any other actual backend.
I've created one to test what specific stuff would be logged in the
Hibernate ORM testsuite; it's quite nice and easy as JBoss Logging
picks up extension points from classpath via the ServiceLoader
pattern.

Although, I'm surprised that you want to use an actual logging
category. The API for that is awful for rich events; I do realize that
"text" is a rather standard API, and stuff like ELK are great because
they can analyze it, but their goal is to consume any Log format,
while you are producing events so you can choose for a richer model.

Structure entities, annotate them and dump them in a Cache. You'll get
benefits like fields being separated already without having to regex
them on the consumer side, and things like numbers being mapped
correctly into optimal-for-range queries. It's always possible to
transform to text at the end if you want to.. just add a
toString()-like contract to your same entity so we could optionally
dump them to a standard appender as well, but don't make it your
primary API for logging rich events.

Sanne

>
> Tristan
>
>
> [1] http://wildfly.org/news/2015/07/25/Wildfly-And-ELK/
>
> --
> Tristan Tarrant
> Infinispan Lead
> JBoss, a division of Red Hat
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


More information about the infinispan-dev mailing list