log « grails « Java Enterprise Q&A





1. Why does automatic injection of log-object not always work in grails?    stackoverflow.com

In the grails-framework some objects are using log. This is normally injected by grails. It works on execution of 'grails test-app'. But the same test (an integration-test) fails on execution of ...

2. no log4j output in Grails app    stackoverflow.com

I have the following log4j config in my Grails 1.1 app

log4j = {

    // Enable Hibernate SQL logging with param values
    trace 'org.hibernate.type'
   ...

3. log4j in grails : how to log into file?    stackoverflow.com

I have this log4j configuration in my grails config.groovy

log4j = {
    error  'org.codehaus.groovy.grails.web.servlet',  //  controllers
           ...

4. Configuring Grails to mail all exceptions generated in the production environment    stackoverflow.com

Question:

  • How do I configure Grails to send an e-mail with all log4j error messages (including exceptions) generated in the production environment?
Worth noting:

5. Grails 1.1.1 log4j DSL throws MissingMethodException for PatternLayout configuration    stackoverflow.com

I've upgraded a Grails 1.0.3 app to Grails 1.1.1. I've upgraded the log4j configuration in Config.groovy to conform to the new DSL. However, after defining a ConsoleAppender with a ...

6. logging specific package's messages to one file in grails and log4j    stackoverflow.com

trying to get all of the log statements from class GetThatDataFilters to go to the rolling file 'dailydata' and everything else to the console and the daily rolling file. dont know if ...

7. Grails logging all to one file    stackoverflow.com

I have an issue when i war my grails project to deploy on my production server there is a limitation that i only log to /var/log/tomcat5/catalina.out. This means that i have ...

8. How do I make Grails start a new log file on startup of the application?    stackoverflow.com

Which log4j appender should I use and how do I configure it? I'm not too bothered about keeping old logs, so I don't care about truncating the existing one.

9. How can i use 'log' inside a src/groovy/ class    stackoverflow.com

I'm encountering this error:

groovy.lang.MissingPropertyException: No such property: log for class: org.utils.MyClass
Here's the content of the class:
package org.utils

class MyClass {
    int organizationCount = 0

  ...





10. Translate Basic Config.groovy log4j DSL to external log4j.properties    stackoverflow.com

The following is a basic log4j configuration inside Config.groovy using the log4j DSL with Grails 1.2, it works as expected (log all errors to the given file):

log4j = {
   ...

11. Logging / Log4J to database    stackoverflow.com

In my Grails application, I run some batch processes asynchronously, and would like the process to log various status messages so that the administrator later can examine them. I thought of ...

12. How do I associate all logs with their request in grails?    stackoverflow.com

In our grails application we're logging a lot, but need a mechanism to associate all of those messages with the request/response being processed. It has proven easy enough to generate ...

13. How to set up my grails logging configuration to show everything    stackoverflow.com

I've set up several packages in my grails application to log to certain files (like 'org.codehaus.groovy.grails.plugins' for example). Now I just experienced that I've missed out on some exceptions from the ...

14. How to log stackTrace without throwing the Exception in grails    stackoverflow.com

In certain situations, I'd like to catch an Exception but still show the Stack Trace in the stackTrace log defined via the Log4J properties in grails. How can I do that? I ...

15. Does grails support logging from the src/java classes?    stackoverflow.com

I have a grails app (v 1.1.2) the logging is working fine from the groovy classes, but I can't get it to work from within a java source... I have a ...

16. Logging in grails for specific controller    stackoverflow.com

I have this code in my Config.groovy:

    appenders {
        console name: "stdout", layout: pattern(conversionPattern: "%c{2} %m%n")
    }

  ...





17. DWR enabling logging in grails?    stackoverflow.com

I'm using DWR3, but I have no idea how to get logging working. No matter what I do, I can't seem to see any DWR3 output as I attempt to debug ...

18. Grails and Log4J : How to logs in different files with same level?    stackoverflow.com

I would like configure Grails log4j to store logs in different files depending of the controller. So, I have a package.Controller1 and package.Controller2 . On controller1, I would like store in logfile1.logs ...

19. How to Log into a file with log4j in grails?    stackoverflow.com

With this app runs without error but i am not finding tmp folder anywhere..Why is that? Below is my log4j code in config file of grails:

log4j={
log4j.logger.grails.app="info, infoLog"
error  'org.codehaus.groovy.grails.web.servlet',  // ...

20. Grails Log4J Not Logging In Production    stackoverflow.com

I have a Grails 1.3.7 application and am trying to setup log4j for production in the configuration. The log4j settings were fine in development, but I can't get anything to show ...

21. Grails Logging - Only log my application, not grails specific junk    stackoverflow.com

Starting from the default logging config, I added the root{} block to turn on debug level logging. And I added a method for my controllers...

log4j = {
  error 'org.codehaus.groovy.grails.web.servlet', ...

22. Grails: Replace log4j with logback    stackoverflow.com

I am trying to replace log4j in my Grails app with logback but am always getting a

Embedded error: java.lang.reflect.InvocationTargetException
org.apache.log4j.LogManager
when running run-app or test-app. I have included the following in BuildConfig.groovy which ...

23. grails: setting log threshold at environment level?    stackoverflow.com

So I'm using a Grails log appender in Config.groovy like this:

console name: 'stdout',
  threshold: org.apache.log4j.Level.FATAL

appender new org.apache.log4j.DailyRollingFileAppender(name: "full",
  threshold: org.apache.log4j.Level.ERROR,
  file: "/tmp/test.log" );
I have environment config like this:
environments ...

24. Grails config: logging "off" config not turning off profiler event logs for org.apache.commons.dbcp?    stackoverflow.com

I have the following in config.groovy: // log4j configuration log4j = {

off    'org.apache.commons.dbcp'
Yet continue to be besieged by hundreds of such messages in the logs:
Thu Nov 10 13:52:29 EST 2011 ...