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

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

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