Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Log level

 
John Cogan
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
My application is launched from a main in Manager.java
which has the line:
private static Logger logger = Logger.getLogger("suncertify.gui");

I want to set the log level throughout my application with:
logger.setLevel(Level.OFF);
or
logger.setLevel(Level.WARNING);

however, logging in DataSchema.java is not affected.
which has the line:
private static Logger logger = Logger.getLogger("suncertify.db");
and
logger.log(Level.INFO, "NumberOfRecords: " + numOfRecords);
Basically, they are in two separate packages. How can I set the log level globally?
Best regards,
John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic