|
From: Dejan K. <dej...@nb...> - 2003-02-21 09:07:21
|
Hi all, Welcome to Babeldoc mailing list! I tought it is better to comunicate this way then using forums on SF. I have already posted this question on SF but it seems that nobody read develpoer forum ;) OK, this problem is related to logging. We should definitly decide if we should use Log4j or commons-logging. In current Babeldoc version we use both. There is really no reasons for this. We have switched from log4j to commons, but after some problems, Bruce have moved back static initializer for log4j configuration in LogService class. I think if we are using commons-logging we should not use any log4j class in the code. All configuration is done by commons-logging (LogFactory class). The only thing it need is log4j.configuration enviroment variable. This variable is set using config file so, user is free to use other logging frameworks without changing the code. I would like to know what problems have been noticed when we didn't have static initializer in LogService. We should solve the problem and remove all log4j code if we are going to use commons-logging. However, the other question is if we really should use commons-logging? The advantages of it is that we have independance of underlying logging framework, that is - we could use jdk 1.4 logging or LogKit framework without changing the code. The main disadvatage is that using commons-logging we cannot use some advanced log4j specific functionality (which we are not using anyway). Also, commons-logging is wrapper and there is probably some overhaed compared to clean log4j. So, I want to discuss about this thing with you guys! Log4j or commons-logging, that is the question! Best regards, Dejan |