|
From: Bryan T. <br...@sy...> - 2010-08-24 15:12:03
|
Brian,
Can you comment on these files? They were introduced into the trunk at revision 2493 and provide for log4j initialization. I will occasionally see messages when running a junit test under eclipse such as:
ERROR: could not initialize Log4J logging utility
set system property '-Dlog4j.configuration=bigdata/src/resources/logging/log4j.properties
and/or
set system property '-Dlog4j.primary.configuration=<installDir>/bigdata/src/resources/logging/log4j.properties'
Historically, I had simply included bigdata/src/resources/logging as a source folder under eclipse such that the log4j.properties file would be resolved using the classpath. This appears to no longer work, at least, not all of the time.
Also, I see the following pattern being used in some classes:
private static final org.apache.log4j.Logger utilLogger =
LogUtil.getLog4jLogger( NicUtil.class );
while most of the code base uses this pattern:
protected static final Logger log = Logger.getLogger(BufferService.class);
I am curious as to the difference in the manner in which these loggers are resolved and what the intent is of the pattern which makes use of LogUtil and what the relationship is between LogUtil and Log4jLoggingHandler.
Also, I was wondering if people would comment on whether to converge on the practice of making the loggers private such that each class has its own logger or allowing loggers to be protected and hence inherited unless overridden. I am happy enough to go with either approach, but I would like to be consistent in the practice that we adopt.
Thanks,
Bryan
|