I am trying to configure a Grails (2.2.0) app to have a log file for a specific package and then use the console output for everything else. I also want to make sure that nothing that goes to the log file also goes to the console (keep them totally separate). Reading through the docs I am still a bit confused on how to get this done. Could someone help out with an example that accomplishes this (using the log4j DSL)?
相关问题
- I want to trace logs using a Macro multi parameter
- Error message 'No handlers could be found for
- convert logback.xml to log4j.properties
- Django management command doesn't show logging
- Grails External Configuration. Can't access to
相关文章
- how do I log requests and responses for debugging
- Android Studio doesn't display logs by package
- Stacktrace does not print in Glassfish 4.1 Cluster
- Out of curiosity — why don't logging APIs impl
- Grails: How to make everything I create Upper Case
- Laravel log file based on date
- Java -How to get logger to work in shutdown hook?
- Codeigniter not logging
I got this working with help from this question. Here's what I ended up with in my Config.groovy:
Then in the class that's supposed to use the extraLogger, I just go the logger like this:
That lets me log more things to the console and some other specific things to another log file, without any of those specific things ending up in the console log.