[opencms-dev] opencms maven. opencms.log not written

Pablo mrfedorento at gmail.com
Tue Apr 7 12:26:35 CEST 2009


Thanks a million Tim! This was driving me nuts.

setting
log4j.appender.CONSOLE=${opencms.logfile}
and
log4j.appender.OC.File=${opencms.logfile} fixed the problem.


I created /WEB-INF/logs/opencms.log manually but I am not sure whether that
was necessary.

All the best.
Pablo


2009/4/7 Tech Ops <techops at thedoleco.com>

>  Did you try setting all levels to DEBUG? Also, I see that you have
> changed the log file location from what is default. Have you? The default
> location line in my log4j is as follows:
>
>
>
> log4j.appender.OC.File=${opencms.logfile}
>
>
>
> do you have write permissions on the / dir ?
>
>
>
> You can also try to set the console logger with same setup as the file
> logger…
>
>
>
> Sorry, don’t have any direct help for you.
>
>
>
> Tim Daschner
>
> VS Dole corp.
>
>
>
>
>
>
>
> *From:* opencms-dev-bounces at opencms.org [mailto:
> opencms-dev-bounces at opencms.org] *On Behalf Of *Pablo
> *Sent:* Monday, April 06, 2009 5:51 AM
> *To:* The OpenCms mailing list
> *Subject:* [opencms-dev] opencms maven. opencms.log not written
>
>
>
> I installed opencms-maven and there is no opencms.log file neither /logs
> folder in /WEB-INF directory. How can I get the opencms logs?
>
> opencms_init.log is empty and below is the content of my log4j.properties.
>
> # What follows is the default OpenCms log4j configuration.
> # OpenCms uses the "commons-logging" component to detect the available
> logging implementation.
> # A recent log4j.jar is shipped with the default OpenCms installation and
> thus log4j is used.
> # To use another logging mechanism, delete the shipped log4j.jar in
> /WEB-INF/lib.
> # You must then provide the configuration of the logging mechanism you want
> to use by
> # environment settings or startup parameters of the servlet engine.
>
> # OpenCms provides a special variable /opencms.log to the environment,
> which contains
> # the log file path. The location of this file is calculated relative to
> this
> # "log4j.properties" file on OpenCms startup. If this file is located in
> the folder "${classes}",
> # then the log is written to "${classes}../logs/opencms.log".
> # To disable this mechanism, you must set ${opencms.set.logfile} to
> "false". In this case
> # you must configure the log output file manually.
> opencms.set.logfile=true
> opencms.logfile=opencms_init.log
>
> # Per default we use WARN debug level and just one appender
> log4j.rootLogger=\
>     ERROR,\
>     OC
>
> # ,CONSOLE
>
> # Optional CONSOLE appender for logging on the system console (good for
> debugging during development)
> log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
>
> # CONSOLE uses PatternLayout.
> log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
> log4j.appender.CONSOLE.layout.ConversionPattern=%5p [%15.15C:%4L] %m%n
>
> # Set levels for all default channels available in OpenCms
> log4j.logger.com.opencms=ERROR
> log4j.logger.org.opencms=ERROR
> log4j.logger.org.opencms.init=INFO
> log4j.logger.org.opencms.monitor=INFO
> log4j.logger.org.opencms.scheduler=INFO
> log4j.logger.org.opencms.search=INFO
> log4j.logger.org.opencms.staticexport=WARN
> log4j.logger.org.opencms.jsp.CmsJspLoginBean=INFO
> log4j.logger.org.opencms.db.mysql3.CmsProjectDriver=INFO
> log4j.logger.org.opencms.db.mysql.CmsProjectDriver=INFO
> log4j.logger.org.opencms.db.oracle8.CmsProjectDriver=INFO
> log4j.logger.org.opencms.db.oracle.CmsProjectDriver=INFO
> log4j.logger.org.opencms.workplace.tools=WARN
>
> # This default appender configuration simply writes all OpenCms channels in
> one log file
> # A OpenCms 'channel' directly translates into a 'logger' in the log4j
> lingo
> log4j.appender.OC=org.apache.log4j.RollingFileAppender
>
> # In a default Tomcat installation, this should place the log file in the
> Tomcat log directory
> # Adjust this path in case you want to log in another directory
> log4j.appender.OC.File=/opencms.log
>
> # Limit log size to 5mb, then rotate
> log4j.appender.OC.MaxFileSize=2mb
>
> # Keep 5 backup files
> log4j.appender.OC.MaxBackupIndex=5
>
> # This specifies the logfile layout
> log4j.appender.OC.layout=org.apache.log4j.PatternLayout
> log4j.appender.OC.layout.ConversionPattern=%d{DATE} %5p [%30.30C:%4L] %m%n
>
>
> --
> Molina, vendido, la sgae es de tu primo.
> Molina, mamon, el torrent lo mejor.
> Tu presencia es dañina, tu gestion es de letrina, pirate ya, molina.
> Vete a la mina Molina.
> http://molinapirate.blogspot.com/
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>



-- 
Molina, vendido, la sgae es de tu primo.
Molina, mamon, el torrent lo mejor.
Tu presencia es dañina, tu gestion es de letrina, pirate ya, molina.
Vete a la mina Molina.
http://molinapirate.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090407/51f8168d/attachment.htm>


More information about the opencms-dev mailing list