Freddy & Aaron,

Thanks for the replies.

Still not getting a stripes.log file.

Here is my log4j.properties file (taken from the quick start example,
installed in WEB-INF/classes, slightly modified):

### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L -
%m%n

### direct messages to file ###
log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File=C:/stripes.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L -
%m%n

### set log levels - for more verbose logging change 'info' to 'debug' ###
log4j.rootLogger=INFO, stdout, file
log4j.logger.net.sourceforge.stripes=DEBUG, stdout, file

Thanks,

Steve Solomon
Sr. Software / Systems Engineer
Ironhawk Technologies, Inc.
6701 Center Drive West, Suite 700
Los Angeles, CA  90045

(310) 815-2800 Main - ext. 6224
(310) 258-9824 Fax

[email protected]


-----Original Message-----
From: Aaron Porter [mailto:[email protected]] 
Sent: Thursday, October 08, 2009 9:22 AM
To: Stripes Users List
Subject: Re: [Stripes-users] log4j configuration

I use commons-logging.properties with a single line in it:
org.apache.commons.logging.Log=net.sourceforge.stripes.util.Log4JLogger

Without that line the log file will contain the line numbers in the Log 
class instead of the classes containing the logging statements.

Aaron

Freddy Daoud wrote:
> Hi Steve,
>
> First of all, try this, it is better:
>
>   import net.sourceforge.stripes.util.Log;
>
>   private Log logger = Log.getInstance(CalculatorActionBean.class);
>
>   // notice , instead of + for better performance
>   logger.error("Divide by zero error: numberOne: ", this.numberOne,
>     " numberTwo: ", this.numberTwo);
>
> Next, if it still doesn't work, please post your log4j.properties file.
>
> Finally, I don't think you need commons-logging.properties. I use log4j
> all the time without it and it works fine; I think commons-logging
> automatically detects the presence of log4j.
>
> Hope that helps.
>
> Cheers,
> Freddy
> http://www.stripesbook.com
>
>
----------------------------------------------------------------------------
--
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>   


----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to