jfreechart-0.9.17 dependancy to log4j

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
zany
Posts: 20
Joined: Mon Mar 15, 2004 2:36 pm
Location: Germany

jfreechart-0.9.17 dependancy to log4j

Post by zany » Mon Mar 29, 2004 1:29 pm

Hi,

it seems the dependancy to log4j is for debugging only (naturally).

Is there more to come? Is it jfc < 1.0 only? Can we perhaps drop it to keep the library tidy?

(I'm using logging myself and was suprised to see debugging output in a jfc release still).

cu,
Christian

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed Mar 31, 2004 1:55 pm

Thanks for the feedback.

Logging has been added because I'm finding it difficult to trace certain bugs that only arise on particular platforms. If a bug happens on Windows or Linux, then I can usually replicate the bug myself. But for Solaris, MacOSX, AIX etc I don't have access to machines to test with, so logging is one of the few options I have.

I haven't decided yet whether the logging should be left in permanently or not. I'll wait to see how useful it proves for tracing bugs. Ideally there would be an easy way to rebuild JFreeChart without logging...I'll investigate the options there also.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

garv

Post by garv » Wed Mar 31, 2004 3:24 pm

I think the logging is perfectly fine, but maybe you can tweak the log levels a bit?

AFAIK, most people run by default at log level INFO (it's JBoss' default log level anyway). I think the INFO level is fine for stuff like "Init:Reading configuration from /tmp/config.properties" or anything of the sort, but that lines such as shown quote below belong at the DEBUG level or lower.

Code: Select all

...
INFO - Entering draw() method, cursor = 169.84375
INFO - Entering drawCategoryLabels() method, cursor = 169.84375
INFO - Entering drawLabel() method, cursor = 187.84375
INFO - Entering drawLabel() method, cursor = 29.09375
INFO - Leaving draw() method
... etcetera

zany
Posts: 20
Joined: Mon Mar 15, 2004 2:36 pm
Location: Germany

Wrapper?

Post by zany » Fri Apr 02, 2004 2:21 pm

Hi,

like grav says logging is a nice feature. Depending on a 350K+ library is the point in question.
Perhaps there is a smaller logging wrapper around? You could bundle the calls with a primitive wrapper otherwise. Having wrappers for wrapper-like things (i.e. logging) is a pain though.
Reflection could be an option if its kept simple.

cu,
Christian

garv
Posts: 127
Joined: Wed Mar 31, 2004 3:44 pm
Location: Amsterdam, The Netherlands

Post by garv » Fri Apr 02, 2004 3:09 pm

Jakarta commons-logging is just 30k. Sounds like a good compromise? :)

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri Apr 02, 2004 4:02 pm

Thomas reminded me that he put a small logging framework into JCommon so I am going to try to use that...
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked