A thought about logging

1 view
Skip to first unread message


Dec 12, 2008, 4:32:53 AM12/12/08
to JGF Users
Had a thought about logging, I thought I should share with you.
Currently JGF just uses log4j right? What if it used SLF4j (http://
www.slf4j.org/)? This would allow the user to decide which
implementation to use. Also, I am not sure, but perhaps it would make
possible to use the same configuration file for applying filters to
jME classes which are logged with the standard java logger?

Not sure about this last option... But coding to an interface seems
like a good idea for me. Anyways I do not feel very strongly about
this topic, so no need to make any changes on my account... but
perhaps something you want to consider later. Thoughts?


José Juan Montes

Dec 13, 2008, 9:07:44 AM12/13/08
to jgf-...@googlegroups.com

I think I just decided for Log4j because is the API I know the better.

Currently, JGF bridges Java Logging messages to Log4j, so it is should be possible to filter jME categories too, and use all Log4j facilities related to appenders and such.

I think adding a new layer is maybe not necessary for something like JGF but I have no idea about whether performance would be seriously affected? (this is apart from the need of using logging.isDebugEnabled() where appropriate as you suggested).

I don't have any particular preference, but I think that may be more appropriate to consider a Logging API change for a later version.

One of the reasons to stick to a particular implementation is that it would be nice to have a service to deal with logging (a quick way to configure categories and files without the need to use a log4j configuration file, or to point to a configuratoin file). That would need to be duplicated if several options for logging are provided.

I must recognise that personally I would prefer to stick to log4j for now, but I have no arguments to sustain that :D.


2008/12/12 Mindgamer <tra...@gmail.com>

Jose Juan Montes
Reply all
Reply to author
0 new messages