problem regarding log4j.properties in opsjava processor

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

problem regarding log4j.properties in opsjava processor

Laxmi Narayana-3
Hi,
I am using ops3.5 in liferay.
I kept Log4j.properties in common/classes.
log4j.rootLogger=INFO, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=C:/logs/log4j.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
I kept Log4j.jar,commons-logging.jar in common/lib.
 
But I tried to write log messages in our java processor(ops/res/apps) it is not writing in logfile .what changes i need to do.
Thanks in advance,
Laxminarayana Yadavalli.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: problem regarding log4j.properties in opsjava processor

Alessandro Vernet
Administrator
Laxmi,

On Thu, Feb 28, 2008 at 9:17 PM, Laxmi Narayana <[hidden email]> wrote:

> Hi,
> I am using ops3.5 in liferay.
> I kept Log4j.properties in common/classes.
> log4j.rootLogger=INFO, R
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.File=C:/logs/log4j.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
>
> I kept Log4j.jar,commons-logging.jar in common/lib.
>
> But I tried to write log messages in our java processor(ops/res/apps) it is
> not writing in logfile .what changes i need to do.
How are you creating the Logger in your Java code? I recommend you do so with:

Logger logger = LoggerFactory.createLogger(YourProcessor.class);

LoggerFactory is in the org.orbeon.oxf.util package. With this, the
logs should go in the regular ops.log (or orbeon.log with the latest
nightly builds). Setup for log4j is in
WEB-INF/resources/config/log4j.xml.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws