Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use logback in grails 3

Grails 3 uses logback as the default system of logging.

I need a example of how use logback in grails 3 in this form

log.info("some Info")
like image 316
José Fernando Silva Avatar asked Mar 29 '15 06:03

José Fernando Silva


1 Answers

You have to set the fourth argument of the logger config to false:

logger('grails.app.controllers', INFO, ['STDOUT'], false)

then the logging is not displayed twice.

I think that's because the root logger catches INFO too.

like image 163
Pascal Avatar answered Oct 21 '22 18:10

Pascal