How can I route logging from my Java webapp on Tomcat 7 to the logs visible in the ElasticBeanstalk admin console or Eclipse plugin? My application is coded to the SLF4J API and backed with Logback.
I'd really like to not have to SSH in to each box and tail a log file; I'm adding and removing instances all the time, so that'd be a right pain.
My logback.xml looks like this:
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.springframework" level="INFO" />
<logger name="org.springframework.social" level="INFO" />
<logger name="org.socialsignin" level="INFO" />
<root level="ALL">
<appender-ref ref="STDOUT" />
</root>
</configuration>