|
From: Bryan T. <br...@sy...> - 2010-08-24 15:33:30
|
Just to follow up on this, I think that this message occurs when the first logger to be initialized is NicUtil, which uses the new system. When the first logger to be initialized uses the old system this message is not displayed. Bryan > -----Original Message----- > From: Bryan Thompson [mailto:br...@sy...] > Sent: Tuesday, August 24, 2010 11:10 AM > To: Bigdata Developers > Subject: [Bigdata-developers] LogUtil, Log4jLoggingHandler > > 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/resour > ces/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 > > -------------------------------------------------------------- > ---------------- > Sell apps to millions through the Intel(R) Atom(Tm) Developer > Program Be part of this innovative community and reach > millions of netbook users worldwide. Take advantage of > special opportunities to increase revenue and speed > time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > _______________________________________________ > Bigdata-developers mailing list > Big...@li... > https://lists.sourceforge.net/lists/listinfo/bigdata-developers > |