You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Philip Wachtel <su...@wachtel.us> on 2003/08/20 21:48:33 UTC
Logging Pain
Hello again,
I have one other question. I'm trying to get used to Turbine and all of the features that come with it, but I'm still a bit shaky with some details.
I'm using Turbine 2.2.0.
I've been trying to write to the logs on a debug level. None seem to write anything anywhere.
I've tried:
Log.info("system", "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
Log.debug("AddUser.doCreateUser(): We've had an exception: " + e.getMessage());
Log.getLogger().debug("system", "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
Log.getLogger().debug("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
Nothing seems to work.
I have log4j.properties in my classes directory. Other logging works in other areas of the system. Just not my logging.
My log4j.properties file contains:
#
# Currently, we use Log4J for all Torque, Fulcrum and Stratum logging
#
log4j.category.org.apache.stratum.component.ComponentLoader = ALL, org.apache.stratum.component.ComponentLoader
log4j.appender.org.apache.stratum.component.ComponentLoader = org.apache.log4j.FileAppender
log4j.appender.org.apache.stratum.component.ComponentLoader.file = turbine.log
log4j.appender.org.apache.stratum.component.ComponentLoader.layout = org.apache.log4j.PatternLayout
log4j.appender.org.apache.stratum.component.ComponentLoader.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.org.apache.stratum.component.ComponentLoader.append = false
log4j.category.org.apache.torque = ALL, org.apache.torque
log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
log4j.appender.org.apache.torque.file = /turbine.log
log4j.appender.org.apache.torque.layout = org.apache.log4j.PatternLayout
log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t] %-5p %c- %m%n
log4j.appender.org.apache.torque.append = false
log4j.category.org.apache.fulcrum = ALL, org.apache.fulcrum
log4j.appender.org.apache.fulcrum = org.apache.log4j.FileAppender
log4j.appender.org.apache.fulcrum.file = /turbine.log
log4j.appender.org.apache.fulcrum.layout = org.apache.log4j.PatternLayout
log4j.appender.org.apache.fulcrum.layout.conversionPattern = %d [%t] %-5p %c- %m%n
log4j.appender.org.apache.fulcrum.append = false
Re: Logging Pain
Posted by Eric Emminger <er...@ericemminger.com>.
Philip
Philip Wachtel wrote:
> Hello again,
>
> I have one other question. I'm trying to get used to Turbine and all of the features that come with it, but I'm still a bit shaky with some details.
>
> I'm using Turbine 2.2.0.
>
> I've been trying to write to the logs on a debug level. None seem to write anything anywhere.
>
> I've tried:
> Log.info("system", "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
> Log.debug("AddUser.doCreateUser(): We've had an exception: " + e.getMessage());
> Log.getLogger().debug("system", "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
> Log.getLogger().debug("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
>
> Nothing seems to work.
>
> I have log4j.properties in my classes directory. Other logging works in other areas of the system. Just not my logging.
>
> My log4j.properties file contains:
> #
> # Currently, we use Log4J for all Torque, Fulcrum and Stratum logging
> #
> log4j.category.org.apache.stratum.component.ComponentLoader = ALL, org.apache.stratum.component.ComponentLoader
> log4j.appender.org.apache.stratum.component.ComponentLoader = org.apache.log4j.FileAppender
> log4j.appender.org.apache.stratum.component.ComponentLoader.file = turbine.log
Is this file path working for you? You may have to use an absolute path.
Also, you have to set the logging level in TurbineResources.properties.
Did you do that?
Eric