Home How to remove verbosity from log4j
Reply: 2

How to remove verbosity from log4j

Sulteric Published in 2018-01-12 14:25:47Z

My log4j log file looks like this.

 2018-01-12 09:21:33,082 [http-nio-8080-exec-39] INFO  diversotron.PropotronService  - ...connected to Selenium Standlone webdriver
 2018-01-12 09:21:33,727 [http-nio-8080-exec-39] INFO  diversotron.PropotronService  - ...attempting to read propotron.ini file.
 2018-01-12 09:21:33,744 [http-nio-8080-exec-39] INFO  diversotron.PropotronService  - ...GDS server name from the propotron.ini file is gdsfareqa2
 2018-01-12 09:21:34,750 [http-nio-8080-exec-39] INFO  diversotron.PropotronService  - ...attempting connection to Propotron.

I'd like to get rid of the date, the "[http-nio-8080-exec-39]" text the log category INFO and the service name. Is that possible?

What would the pattern look like to do that?

 def pattern = new PatternLayout("%-5p [%t]: %m%n")

Any help vastly appreciated!

Kurt Bliefernich
Kurt Bliefernich Reply to 2018-01-12 15:05:57Z

This might help. I use slf4j, and have a logback.groovy file in the grails-app/config directory. Looks like you can configure it in the Config.groovy file


Sulteric Reply to 2018-01-12 18:17:42Z

I got it.

def pattern = new PatternLayout( "%m%n" )

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.375183 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO