logging - Change java.util log levels in tomcat (or tomEE or openEJB) -


i have following logger defined in servlet.

private final static logger logger = logger.getlogger(testservlet.class.getname());  

changed logger levels in logging.properties,

logger.log(level.fine, "hello"); 

doesn't print.

eclipse has integrity issues tomcat. following steps helped.

  • open server configuration double clicking server (in servers tab)
  • click open lauch configuration
  • in arguments tab add following jvm arguments

-djava.util.logging.config.file="{your tomcat folder}\conf\logging.properties"
-djava.util.logging.manager=org.apache.juli.classloaderlogmanager

to change logging levels,

through configuration:

edit logging.properties add logging levels

com.level = fine

or through code:

static { logger.setlevel(level.fine); }


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -