How can I get the grails application to log in as shown on the AWS Elastic Beanstalk Logs tab?

According to http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/index.html?using-features.loggingS3.title.html , only Tomcat log entries will be logged through java.util.logging. Grails uses Log4J. How would I best bring the two together? I do not want to have ssh in the instance every time I want to see the log message.

+4
source share
1 answer

There is a LOG4J JUL bridge.

See: https://forums.aws.amazon.com/thread.jspa?threadID=64008 for a discussion

Bridge: http://people.apache.org/~psmith/logging.apache.org/sandbox/jul-log4j-bridge

The corresponding configuration (in .properties format) is as follows:

log4j.appender.jul=org.apache.log4j.jul.JULAppender log4j.appender.jul.layout=org.apache.log4j.PatternLayout log4j.appender.jul.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n log4j.rootLogger = DEBUG, jul 

Try using the various translated Config.groovy versions of this and see if it takes you anywhere.

+2
source

Source: https://habr.com/ru/post/1379717/


All Articles