[opencms-dev] problem with log4j - opencms_init.log
Christoph P. Kukulies
kuku at physik.rwth-aachen.de
Thu Dec 9 17:19:51 CET 2010
On Thu, Dec 09, 2010 at 10:56:02AM -0500, eelboy at aol.com wrote:
> I am new to OpenCms, so take my post lightly :) Running my tomcat as
> ROOT webapp (as well as root user):
Thanks for confirming my observations and good to know that I'm not
alone. Wonder what the OpenCMS developers have to say about it :-)
--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
>
> It seemed to me that this file (opencms_init.log) was being placed in
> whatever
> directory I was in at the time that I started tomcat. I have never seen
> any data in this file (always size 0). I finally
> decided that I would rather not have them sprayed around my file system
> so I went into the log4j.properties and
> made this change:
You did that in $(CATALINA_HOME)/common/classes/log4j.properties?
Or does opencms have a place for this?
>
> opencms.set.logfile=true
> opencms.logfile=${catalina.base}/logs/opencms_init.log
>
> What I expected then was to see this file in the tomcat logs directory.
> But, to my surprise , it simply doesn't
> get created anymore. I don't get any errors in any other log files
> though, so that was good enough for me.
> I would love to know what the developers intended to write to this
> file. (The remaining configuration in
> the log4j.properties seems to work fine and is logging normally to the
> file that I have specified).
>
> Hope this helps,
> eelboy
>
>
> On 12/9/2010 10:40 AM, Christoph P. Kukulies wrote:
> > I'm resurrecting a site which runs under Debian (squeeze) and after
> > having tamed tomcat6 and had filled ~/webapps/ROOT (running opencms as
> > the ROOT app with the rewrite rules and http-proxies) again from the
> > backup, I'm seeing some ERROR message in catalina.out.
> >
> > I also have log4j enabled, for what it's worth. Maybe it has got to do with
> > it. I wonder what's triggering opencms_init.log since I only found
> > it randomly in some places and there doesn't seem to be any pattern where
> > it should be located.
> >
> > The permission problem could stem from the fact that tomcat is running under
> > user tomcat6 and it might be it wants to read or write a file w/o permissions.
> >
> >
> > log4j.properties: -------------------------------------
> >
> >
> > log4j.rootLogger=DEBUG, R
> > log4j.appender.R=org.apache.log4j.RollingFileAppender
> > log4j.appender.R.File=${catalina.home}/logs/tomcat.log
> > log4j.appender.R.MaxFileSize=10MB
> > log4j.appender.R.MaxBackupIndex=10
> > log4j.appender.R.layout=org.apache.log4j.PatternLayout
> > log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
> >
> >
> > catalina.out: -----------------------------------------
> >
> > INFO: Deploying web application directory ROOT
> > log4j:ERROR setFile(null,true) call failed.
> > java.io.FileNotFoundException: opencms_init.log (Permission denied)
> > at java.io.FileOutputStream.openAppend(Native Method)
> > at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
More information about the opencms-dev
mailing list