On Fri, Jun 25, 2010 at 2:05 AM, alex <
[email protected]> wrote:
> Hi Fred,
>
> first of all: gwt-log is awsome. Keep progging.
>
> I have some questions about serverside logging into a file.
>
> I've tried a couple things out but nothing worked.
> Problem: The file is not beeing created at all.
>
> So here are my questions:
>
> Do I have to use log4j for logging into a file on the server?
>
No, but if you don't gwt-log will default to java.util.logging instead of
log4j
> If so:
> - Wich .jar should I use (I dont use maven) log4j-1.2.15.jar or
> log4j-1.2.14.jar?
>
Either should be fine.
> - How I should configure log4j?
>
In the usual way, e.g. log4j.properties or log4j.xml or programmatically.
-- Should I use log4j.xml and log4j.dtd or should I use
> log4j.properties?
>
*.dtd is for your use. *.xml or *.properties file is for configuration.
> If it should be log4j.properties
> - What is wrong with this configuration?:
> #
> # To use this configuration, deploy it into your
> application's WEB-
> INF/classes
> # directory. You are also encouraged to edit it as
> you like.
>
> # Der Root-Logger hat den Level DEBUG
> log4j.rootLogger=DEBUG, A1, file
>
> # Configure the console as our one appender
> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>
> log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p
> [%c] - %m%n
>
>
> # Für alle Klassen des Packages ch.scherer-it.xy den
> Level ERROR
> zuweisen
> #log4j.logger.ch.scherer-it.xy=ERROR
>
> # Konfiguration der Log-Datei
>
> log4j.appender.file=org.apache.log4j.RollingFileAppender
> log4j.appender.file.File=D:/temp.log
> log4j.appender.file.MaxFileSize=1MB
> log4j.appender.file.MaxBackupIndex=1
>
> log4j.appender.file.layout=org.apache.log4j.PatternLayout
>
> log4j.appender.file.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p
> [%c] - %m%n
>
>
> # tighten logging on the DataNucleus Categories
> log4j.category.DataNucleus.JDO=WARN, A1
> log4j.category.DataNucleus.Persistence=WARN, A1
> log4j.category.DataNucleus.Cache=WARN, A1
> log4j.category.DataNucleus.MetaData=WARN, A1
> log4j.category.DataNucleus.General=WARN, A1
> log4j.category.DataNucleus.Utility=WARN, A1
> log4j.category.DataNucleus.Transaction=WARN, A1
> log4j.category.DataNucleus.Datastore=WARN, A1
> log4j.category.DataNucleus.ClassLoading=WARN, A1
> log4j.category.DataNucleus.Plugin=WARN, A1
> log4j.category.DataNucleus.ValueGeneration=WARN, A1
> log4j.category.DataNucleus.Enhancer=WARN, A1
> log4j.category.DataNucleus.SchemaTool=WARN, A1
>
>
Not sure, but try logging a message server side inside a servlet. If that
works, then log4j on the server is working.
> Here is what I've added to my web.xml :
> ...
> <servlet>
> <servlet-name>remoteLoggerServiceImpl</servlet-name>
> <servlet-
> class>com.allen_sauer.gwt.log.server.RemoteLoggerServiceImpl</servlet-
> class>
> </servlet>
>
>
> <servlet-mapping>
> <!--
> servlet-name>gwt-log-remote-logger-servlet</servlet-name-->
> <servlet-name>remoteLoggerServiceImpl</servlet-name>
> <url-pattern>/pageflipgwt/gwt-log</url-pattern>
> </servlet-mapping>
>
That looks fine.
> ...
>
> --
> You received this message because you are subscribed to the Google Groups
> "gwt-log" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<gwt-log%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/gwt-log?hl=en.
>
>
--
Fred Sauer
Developer Advocate
Google Inc.
1600 Amphitheatre Parkway
Mountain View, CA 94043
[email protected]
--
You received this message because you are subscribed to the Google Groups
"gwt-log" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/gwt-log?hl=en.