I am using intellij idea with glassfish and in the console i see this long message for every line :

[2013-01-29T15:27:39.395-0500] [glassfish 4.0] [INFO] [AS-JMX-00005] [javax.enterprise.system.jmx] [tid: _ThreadID=49 _ThreadName=Thread-6] [timeMillis: 1359491259395] [levelValue: 800] [[ …

to reduce and shorten the messages, go to  glassfish admin console -> configurations -> server-config -> logger-settings :

select all fields in the format exclude fields and click save.

Screen Shot 2015-01-18 at 00.13.35

and shorten your log4j pattern in log4j.properties. From :

log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n

to this pattern :

log4j.appender.stdout.layout.ConversionPattern=%c{1}:%L - %m%n
Advertisements