Oops; more stumbling. I think it's usually Commons Logging that causes
problems with tomcat, and perhaps elsewhere, not log4j. slf4j is a Commons
Logging alternative.
Rusty Wright wrote:
What I just wrote is probably confusing; I'm using slf4j with logback
for logging, not log4j. You don't need a logback.xml configuration file
if you're using slf4j with log4j (but you will need a log4j
configuration file).
I prefer logback because with tomcat you can never be sure that any
problems with the logging aren't being caused by tomcat's logging (but
since gae isn't using tomcat that shouldn't be an issue here). Also,
logback is more actively supported (and it's written by the same guy who
wrote log4j).
Rusty Wright wrote:
I also vote for slf4j. If you need a "for example", here's my
logback.xml file, which lives in the WEB-INF/classes directory:
<?xml version="1.0" encoding="UTF-8"?>
<!-- <pattern>%date{yyyy-MM-dd HH:mm:ss.SSS z}, %5level: [%thread]
%class.%method.%line: %message%n</pattern> -->
<configuration debug="true">
<appender class="ch.qos.logback.core.ConsoleAppender"
name="RootConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%5level: [%thread] %class.%method.%line:
%message%n</pattern>
</layout>
</appender>
<logger name="org.springframework.beans">
<level
value="warn"
/>
</logger>
<logger name="org.springframework.transaction">
<level
value="debug"
/>
</logger>
<logger name="org.springframework.orm.jdo.JdoTransactionManager">
<level
value="debug"
/>
</logger>
<!--
<logger
name="com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue">
<level
value="warn"
/>
</logger>
-->
<root>
<level
value="info"
/>
<appender-ref
ref="RootConsoleAppender"
/>
</root>
</configuration>
?? wrote:
I use slf4j!
use slf4j-log4j when development!
use slf4j-jdk log when GAE Server!(change slf4j-log4j to
slf4j-jdk-log before GAE appcfg update war)
2010/2/2 Alex <alexanderko...@gmail.com
<mailto:alexanderko...@gmail.com>>
Hello,
Has anyone tried to use Log4j in production GAE? Is it supported?
According to Java GAE docs, only java.util.logging is fully
supported.
See http://code.google.com/appengine/docs/java/runtime.html#Logging
[...]
Any logging framework (such as log4j) that logs to the output or
error streams will work. However, for more fine-grained control
of the
Admin Console's log level display, the logging framework must use a
java.util.logging adapter.
[...]
On the other hand, I see that log4j.properties is included into
every
project created by GAE Eclipse plugin.
I tried Log4j in a test application and Lo4j is working fine in
development environment. But it doesn't (just does nothing) when I
deploy my test application into live GAE server.
Thanks in advance for any info,
Alex
--
You received this message because you are subscribed to the Google
Groups "Google App Engine for Java" group.
To post to this group, send email to
google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.
--
0x2B | ~0x2b -- Hamlet
--
You received this message because you are subscribed to the Google Groups "Google
App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.