RE: Cannot turn off logging when using JUnit

2005-09-29 Thread Rakesh Patel
I am indeed using the 1.3 alpha version.

However, adding this line makes no difference:

log4j.logger.org.apache.log4j=WARN

Jake, your last paragraph contradicts itself. You say the internal code
cannot be overriden and then you say it can?

Any idea when the next release will fix this (no time to build from
source)?

Thanks

Rakesh

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED] 
Sent: 28 September 2005 23:14
To: Log4J Users List; Mark Womack
Subject: Re: Cannot turn off logging when using JUnit


Quoting Mark Womack <[EMAIL PROTECTED]>:

> Can we assume that you are using the 1.3 alpha version? You will want 
> to add configuration to set org.apache.log4j to WARN/ERROR or OFF.
>

I think at some point, the auto-logging of logger creation internal to
Log4j-1.3 in CVS was removed.  The current release alpha still has it
turned on no matter what.

I suggest either waiting for the next alpha release or building yourself
from source.  Note that, besides this, you control log4j internal
logging using normal log4j configuration, just like any other logger.
So, if you want to turn off log4j logging, then make sure to set the
level pretty high for the org.apache.log4j logger.


Jake

> hth,
> -Mark
>
> On 9/28/05, Rakesh Patel <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I have a test set up that logs and also the class under test logs 
> > too.
> >
> > I want to turn of logging at times but am finding that the console 
> > ALWAYS logs INFO messages of the loggers being created (my user 
> > defined log entries are not displayed).
> >
> > I've tried various settings in the property file but I just cannot 
> > stop these entries going to the console.
> >
> > Here's my property file:
> >
> > log4j.rootLogger=OFF, stdout, R 
> > log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> >
> > # Print the date in ISO 8601 format 
> > log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - 
> > %m%n
> >
> > #log4j.appender.R=org.apache.log4j.FileAppender
> > log4j.appender.R.File=app.log
> >
> > log4j.appender.R.layout=org.apache.log4j.PatternLayout
> > log4j.appender.R.layout.ConversionPattern=%d %-5p %c - %m%n
> >
> > # Vary level for packages log4j.logger.org.springframework=ERROR
> >
> > And here's the bit of my initialisation code in my Junit setUp:
> >
> > protected void setUp() throws Exception {
> >
> > PropertyConfigurator.configure("c:/Projects/FETServer/conf/log4j.pro
> > pert
> > ies");
> > // initialise datasource
> > _logger.info("One-time setUp()");
> > _logger.info("intializing connection...");
> > dataSource = new SingleConnectionDataSource();
> > dataSource.setDriverClassName(
> > "oracle.jdbc.driver.OracleDriver");
> > dataSource.setUrl(
> > "jdbc:oracle:thin:@132.25.50.69:1521:ORCL01");
> > dataSource.setUsername("scott");
> > dataSource.setPassword("tiger");
> >
> > dao = new SampleDao(dataSource);
> > }
> >
> > And here's whats going to the console:
> >
> > *** configurationOptionStr=null
> > ** End of LogManager static initializer
> > log4j:INFO Creating new logger [com.amex.ifst.fet.dao.TestSampleDao]

> > in repository [default]. log4j:INFO Creating new logger 
> > [org.apache.log4j] in repository [default].
> > log4j:INFO Creating new logger
[org.apache.log4j.PropertyConfigurator]
> > in repository [default].
> > log4j:INFO Returning existing logger
> > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > log4j:INFO Returning existing logger
> > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > log4j:INFO Returning existing logger
> > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > log4j:INFO Returning existing logger
> > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > log4j:INFO Creating new logger
[org.apache.log4j.config.PropertySetter]
> > in repository [default].
> > log4j:INFO Returning existing logger
> > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > log4j:INFO Returning existing logger
> > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > log4j:INFO Returning existing logger
> > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > log4j:INFO Creating new logger
> > [org.apache.log4j.helpers.OptionConverter] in repository [default].
> > log4j:INFO Returning existing logger
> > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > log4j:INFO Creating new logger [org.springframework] in repository
> > [default].
> > log4j:INFO Returning existing logger
> > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > log4j:INFO Returning existing logger
> > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > log4j:INFO Returning existing logger
> > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > log4j:INFO Returning existing logger
> > [org.apache.log4j.PropertyConfigurator] in repository [default].

can we create web based interface for logviewers

2005-09-29 Thread Nurjahan


  I want to develop a webbased Logviewer to open the log files .
 can anybode helps me how to do that ?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



writing logs into multiple files

2005-09-29 Thread K Srinivas
Hi,

currently i am writing the whole of the logs of my
application into a single log file.

I want to write the logs into different log files
based
on the log level.  or the package level (meaning
classes
in the same package will write to a single log file).
Hence if i have 5 packages in my application, i should

write the logs into 5 log files

can any one please give me a solution for the same?

Thanks in advance
srinivas








__ 
Yahoo! India Matrimony: Find your partner online. Go to http://yahoo.shaadi.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: writing logs into multiple files

2005-09-29 Thread Antoine TYNEVEZ

I think you might write something like that  :


   
 
   
   
   





   

and so on for INFO, WARN, ERROR and FATAL

hope it could help

Antoine


K Srinivas a écrit :


Hi,

currently i am writing the whole of the logs of my
application into a single log file.

I want to write the logs into different log files
based
on the log level.  or the package level (meaning
classes
in the same package will write to a single log file).
Hence if i have 5 packages in my application, i should

write the logs into 5 log files

can any one please give me a solution for the same?

Thanks in advance
srinivas








__ 
Yahoo! India Matrimony: Find your partner online. Go to http://yahoo.shaadi.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




 



--

*Antoine Tynévez*
/Patrimoine Management & Technologies/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: can we create web based interface for logviewers

2005-09-29 Thread Lutz Michael

you should check out this product ...

http://www.xpolog.com
 

-Original Message-
From: Nurjahan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 29, 2005 5:17 AM
To: log4j-user@logging.apache.org
Subject: can we create web based interface for logviewers



  I want to develop a webbased Logviewer to open the log files .
 can anybode helps me how to do that ?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---
This message and any included attachments are from Siemens Medical Solutions 
USA, Inc. and are intended only for the addressee(s).  
The information contained herein may include trade secrets or privileged or 
otherwise confidential information.  Unauthorized review, forwarding, printing, 
copying, distributing, or using such information is strictly prohibited and may 
be unlawful.  If you received this message in error, or have reason to believe 
you are not authorized to receive it, please promptly delete this message and 
notify the sender by e-mail with a copy to [EMAIL PROTECTED] 

Thank you

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Cannot turn off logging when using JUnit

2005-09-29 Thread Jacob Kjome
Quoting Rakesh Patel <[EMAIL PROTECTED]>:

> I am indeed using the 1.3 alpha version.
>
> However, adding this line makes no difference:
>
> log4j.logger.org.apache.log4j=WARN
>
> Jake, your last paragraph contradicts itself. You say the internal code
> cannot be overriden and then you say it can?
>

Sorry if I wasn't clear.  When I said "Note that, besides this", I meant to
exclude the rest of the comments from the previously described hardcoded
behavior that is in the current alpha, but removed from the latest source.

So, there is no contradiction.  They were two completely separate trains of
thought of two entirely different logging issues.

> Any idea when the next release will fix this (no time to build from
> source)?
>

I believe that some of the developers are working on getting a new release out
as we speak!

Jake

> Thanks
>
> Rakesh
>
> -Original Message-
> From: Jacob Kjome [mailto:[EMAIL PROTECTED]
> Sent: 28 September 2005 23:14
> To: Log4J Users List; Mark Womack
> Subject: Re: Cannot turn off logging when using JUnit
>
>
> Quoting Mark Womack <[EMAIL PROTECTED]>:
>
> > Can we assume that you are using the 1.3 alpha version? You will want
> > to add configuration to set org.apache.log4j to WARN/ERROR or OFF.
> >
>
> I think at some point, the auto-logging of logger creation internal to
> Log4j-1.3 in CVS was removed.  The current release alpha still has it
> turned on no matter what.
>
> I suggest either waiting for the next alpha release or building yourself
> from source.  Note that, besides this, you control log4j internal
> logging using normal log4j configuration, just like any other logger.
> So, if you want to turn off log4j logging, then make sure to set the
> level pretty high for the org.apache.log4j logger.
>
>
> Jake
>
> > hth,
> > -Mark
> >
> > On 9/28/05, Rakesh Patel <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > I have a test set up that logs and also the class under test logs
> > > too.
> > >
> > > I want to turn of logging at times but am finding that the console
> > > ALWAYS logs INFO messages of the loggers being created (my user
> > > defined log entries are not displayed).
> > >
> > > I've tried various settings in the property file but I just cannot
> > > stop these entries going to the console.
> > >
> > > Here's my property file:
> > >
> > > log4j.rootLogger=OFF, stdout, R
> > > log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> > > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> > >
> > > # Print the date in ISO 8601 format
> > > log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c -
> > > %m%n
> > >
> > > #log4j.appender.R=org.apache.log4j.FileAppender
> > > log4j.appender.R.File=app.log
> > >
> > > log4j.appender.R.layout=org.apache.log4j.PatternLayout
> > > log4j.appender.R.layout.ConversionPattern=%d %-5p %c - %m%n
> > >
> > > # Vary level for packages log4j.logger.org.springframework=ERROR
> > >
> > > And here's the bit of my initialisation code in my Junit setUp:
> > >
> > > protected void setUp() throws Exception {
> > >
> > > PropertyConfigurator.configure("c:/Projects/FETServer/conf/log4j.pro
> > > pert
> > > ies");
> > > // initialise datasource
> > > _logger.info("One-time setUp()");
> > > _logger.info("intializing connection...");
> > > dataSource = new SingleConnectionDataSource();
> > > dataSource.setDriverClassName(
> > > "oracle.jdbc.driver.OracleDriver");
> > > dataSource.setUrl(
> > > "jdbc:oracle:thin:@132.25.50.69:1521:ORCL01");
> > > dataSource.setUsername("scott");
> > > dataSource.setPassword("tiger");
> > >
> > > dao = new SampleDao(dataSource);
> > > }
> > >
> > > And here's whats going to the console:
> > >
> > > *** configurationOptionStr=null
> > > ** End of LogManager static initializer
> > > log4j:INFO Creating new logger [com.amex.ifst.fet.dao.TestSampleDao]
>
> > > in repository [default]. log4j:INFO Creating new logger
> > > [org.apache.log4j] in repository [default].
> > > log4j:INFO Creating new logger
> [org.apache.log4j.PropertyConfigurator]
> > > in repository [default].
> > > log4j:INFO Returning existing logger
> > > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > > log4j:INFO Returning existing logger
> > > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > > log4j:INFO Returning existing logger
> > > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > > log4j:INFO Returning existing logger
> > > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > > log4j:INFO Creating new logger
> [org.apache.log4j.config.PropertySetter]
> > > in repository [default].
> > > log4j:INFO Returning existing logger
> > > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > > log4j:INFO Returning existing logger
> > > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > > log4j:INFO Returning existing logger
> > > [org.apache.log4j.PropertyConfigurator] in repository [default].
> > > log4j:INFO Cre

RE: Cannot turn off logging when using Junit - SOLVED

2005-09-29 Thread Rakesh Patel
Hi,

Ok I built from source using the latest in cvs. It wasn't as hard as I
thought it would be (not sure why all 3rd party libs are not included
though in cvs?).

Turning the logging to OFF does what I need now!

Thanks for the help,

Rakesh

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED] 
Sent: 29 September 2005 15:12
To: Log4J Users List
Subject: RE: Cannot turn off logging when using JUnit


Quoting Rakesh Patel <[EMAIL PROTECTED]>:

> I am indeed using the 1.3 alpha version.
>
> However, adding this line makes no difference:
>
> log4j.logger.org.apache.log4j=WARN
>
> Jake, your last paragraph contradicts itself. You say the internal 
> code cannot be overriden and then you say it can?
>

Sorry if I wasn't clear.  When I said "Note that, besides this", I meant
to exclude the rest of the comments from the previously described
hardcoded behavior that is in the current alpha, but removed from the
latest source.

So, there is no contradiction.  They were two completely separate trains
of thought of two entirely different logging issues.

> Any idea when the next release will fix this (no time to build from 
> source)?
>

I believe that some of the developers are working on getting a new
release out as we speak!

Jake

> Thanks
>
> Rakesh
>
> -Original Message-
> From: Jacob Kjome [mailto:[EMAIL PROTECTED]
> Sent: 28 September 2005 23:14
> To: Log4J Users List; Mark Womack
> Subject: Re: Cannot turn off logging when using JUnit
>
>
> Quoting Mark Womack <[EMAIL PROTECTED]>:
>
> > Can we assume that you are using the 1.3 alpha version? You will 
> > want to add configuration to set org.apache.log4j to WARN/ERROR or 
> > OFF.
> >
>
> I think at some point, the auto-logging of logger creation internal to

> Log4j-1.3 in CVS was removed.  The current release alpha still has it 
> turned on no matter what.
>
> I suggest either waiting for the next alpha release or building 
> yourself from source.  Note that, besides this, you control log4j 
> internal logging using normal log4j configuration, just like any other

> logger. So, if you want to turn off log4j logging, then make sure to 
> set the level pretty high for the org.apache.log4j logger.
>
>
> Jake
>
> > hth,
> > -Mark
> >
> > On 9/28/05, Rakesh Patel <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > I have a test set up that logs and also the class under test logs 
> > > too.
> > >
> > > I want to turn of logging at times but am finding that the console

> > > ALWAYS logs INFO messages of the loggers being created (my user 
> > > defined log entries are not displayed).
> > >
> > > I've tried various settings in the property file but I just cannot

> > > stop these entries going to the console.
> > >
> > > Here's my property file:
> > >
> > > log4j.rootLogger=OFF, stdout, R 
> > > log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> > > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> > >
> > > # Print the date in ISO 8601 format 
> > > log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - 
> > > %m%n
> > >
> > > #log4j.appender.R=org.apache.log4j.FileAppender
> > > log4j.appender.R.File=app.log
> > >
> > > log4j.appender.R.layout=org.apache.log4j.PatternLayout
> > > log4j.appender.R.layout.ConversionPattern=%d %-5p %c - %m%n
> > >
> > > # Vary level for packages log4j.logger.org.springframework=ERROR
> > >
> > > And here's the bit of my initialisation code in my Junit setUp:
> > >
> > > protected void setUp() throws Exception {
> > >
> > > PropertyConfigurator.configure("c:/Projects/FETServer/conf/log4j.p
> > > ro
> > > pert
> > > ies");
> > > // initialise datasource
> > > _logger.info("One-time setUp()");
> > > _logger.info("intializing connection...");
> > > dataSource = new SingleConnectionDataSource();
> > > dataSource.setDriverClassName(
> > > "oracle.jdbc.driver.OracleDriver");
> > > dataSource.setUrl(
> > > "jdbc:oracle:thin:@132.25.50.69:1521:ORCL01");
> > > dataSource.setUsername("scott");
> > > dataSource.setPassword("tiger");
> > >
> > > dao = new SampleDao(dataSource);
> > > }
> > >
> > > And here's whats going to the console:
> > >
> > > *** configurationOptionStr=null
> > > ** End of LogManager static initializer
> > > log4j:INFO Creating new logger 
> > > [com.amex.ifst.fet.dao.TestSampleDao]
>
> > > in repository [default]. log4j:INFO Creating new logger 
> > > [org.apache.log4j] in repository [default]. log4j:INFO Creating 
> > > new logger
> [org.apache.log4j.PropertyConfigurator]
> > > in repository [default].
> > > log4j:INFO Returning existing logger 
> > > [org.apache.log4j.PropertyConfigurator] in repository [default]. 
> > > log4j:INFO Returning existing logger 
> > > [org.apache.log4j.PropertyConfigurator] in repository [default]. 
> > > log4j:INFO Returning existing logger 
> > > [org.apache.log4j.PropertyConfigurator] in repository [default]. 
> > > log4j:INFO Returning existing logger 
> > > [org.apache.log4j.PropertyConfigurator] in repository [default]. 
> > >

Re: files not rolling over - debug dump

2005-09-29 Thread James Stauffer
Did something else have the file open at the time?

On 9/28/05, David Thielen <[EMAIL PROTECTED]> wrote:
> Hi;
>
> I ran last night with log4j debugging on and got:
>
> log4j: setFile called: C:\Tomcat 5.5/logs/tomcat.log, true
> log4j: setFile ended
> log4j: Appender [tomcat] to be rolled at midnight.
> log4j: Adding appender named [tomcat] to category [root].
>  WARN [TP-Processor3] No configuration found. Configuring ehcache from
> ehcache-failsafe.xml found in the classpath:
> jar:file:/C:/Tomcat%205.5/webapps/store/WEB-INF/lib/ehcache-1.1.jar!/ehcache
> -failsafe.xml - net.sf.ehcache.config.Configurator configure
> log4j:ERROR Failed to rename [C:\Tomcat 5.5/logs/tomcat.log] to [C:\Tomcat
> 5.5/logs/tomcat.log.2005-09-27].
> log4j: setFile called: C:\Tomcat 5.5/logs/tomcat.log, false
> log4j: setFile ended
>
> and
>
> log4j: setFile called: C:\Tomcat 5.5/logs/tomcat.log, true
> log4j: setFile ended
> log4j: Appender [tomcat] to be rolled at midnight.
> log4j: Adding appender named [tomcat] to category [root].
>  WARN [TP-Processor3] No configuration found. Configuring ehcache from
> ehcache-failsafe.xml found in the classpath:
> jar:file:/C:/Tomcat%205.5/webapps/store/WEB-INF/lib/ehcache-1.1.jar!/ehcache
> -failsafe.xml - net.sf.ehcache.config.Configurator configure
>  WARN [TP-Processor3] *** WARNING: Keyword  'end' is being intepreted as an
> identifier due to: expecting IDENT, found 'end' - org.hibernate.hql.PARSER
> reportWarning
> log4j:ERROR Failed to rename [C:\Tomcat 5.5/logs/windward.log] to [C:\Tomcat
> 5.5/logs/windward.log.2005-09-27].
> log4j: setFile called: C:\Tomcat 5.5/logs/windward.log, false
> log4j: setFile ended
>
> Any ideas?
>
> Again, the system has full rights in the folder and on the files and is
> renaming stdout.log fine.
>
> ??? - thanks - dave
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot turn off logging when using JUnit

2005-09-29 Thread Mark Womack
Indeed. It is my task for this evening to do the next 1.3 alpha build. I was
going to do it earlier this week, but my time ran out at the ends of the
various days...

-Mark

On 9/29/05, Jacob Kjome <[EMAIL PROTECTED]> wrote:
>
>
>
> I believe that some of the developers are working on getting a new release
> out
> as we speak!


Re: Cannot turn off logging when using Junit - SOLVED

2005-09-29 Thread Mark Womack
The libs are not included in the cvs due to various licensing issues. At
least at the time that was the issue I remember. We should revisit it as
part of the 1.3 push. I'm sure we can include the Apache jars and I would
like the build process to be as self-contained as possible. You could always
override with a version of the jars you preferred, but the repository would
contain the versions the official builds are built with.

But glad to hear you were able to work through the build locally.

-Mark

On 9/29/05, Rakesh Patel <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Ok I built from source using the latest in cvs. It wasn't as hard as I
> thought it would be (not sure why all 3rd party libs are not included
> though in cvs?).
>
> Turning the logging to OFF does what I need now!
>
> Thanks for the help,
>
> Rakesh
>
> -Original Message-
> From: Jacob Kjome [mailto:[EMAIL PROTECTED]
> Sent: 29 September 2005 15:12
> To: Log4J Users List
> Subject: RE: Cannot turn off logging when using JUnit
>
>
> Quoting Rakesh Patel <[EMAIL PROTECTED]>:
>
> > I am indeed using the 1.3 alpha version.
> >
> > However, adding this line makes no difference:
> >
> > log4j.logger.org.apache.log4j=WARN
> >
> > Jake, your last paragraph contradicts itself. You say the internal
> > code cannot be overriden and then you say it can?
> >
>
> Sorry if I wasn't clear. When I said "Note that, besides this", I meant
> to exclude the rest of the comments from the previously described
> hardcoded behavior that is in the current alpha, but removed from the
> latest source.
>
> So, there is no contradiction. They were two completely separate trains
> of thought of two entirely different logging issues.
>
> > Any idea when the next release will fix this (no time to build from
> > source)?
> >
>
> I believe that some of the developers are working on getting a new
> release out as we speak!
>
> Jake
>
> > Thanks
> >
> > Rakesh
> >
> > -Original Message-
> > From: Jacob Kjome [mailto:[EMAIL PROTECTED]
> > Sent: 28 September 2005 23:14
> > To: Log4J Users List; Mark Womack
> > Subject: Re: Cannot turn off logging when using JUnit
> >
> >
> > Quoting Mark Womack <[EMAIL PROTECTED]>:
> >
> > > Can we assume that you are using the 1.3 alpha version? You will
> > > want to add configuration to set org.apache.log4j to WARN/ERROR or
> > > OFF.
> > >
> >
> > I think at some point, the auto-logging of logger creation internal to
>
> > Log4j-1.3 in CVS was removed. The current release alpha still has it
> > turned on no matter what.
> >
> > I suggest either waiting for the next alpha release or building
> > yourself from source. Note that, besides this, you control log4j
> > internal logging using normal log4j configuration, just like any other
>
> > logger. So, if you want to turn off log4j logging, then make sure to
> > set the level pretty high for the org.apache.log4j logger.
> >
> >
> > Jake
> >
> > > hth,
> > > -Mark
> > >
> > > On 9/28/05, Rakesh Patel <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I have a test set up that logs and also the class under test logs
> > > > too.
> > > >
> > > > I want to turn of logging at times but am finding that the console
>
> > > > ALWAYS logs INFO messages of the loggers being created (my user
> > > > defined log entries are not displayed).
> > > >
> > > > I've tried various settings in the property file but I just cannot
>
> > > > stop these entries going to the console.
> > > >
> > > > Here's my property file:
> > > >
> > > > log4j.rootLogger=OFF, stdout, R
> > > > log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> > > > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> > > >
> > > > # Print the date in ISO 8601 format
> > > > log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c -
> > > > %m%n
> > > >
> > > > #log4j.appender.R=org.apache.log4j.FileAppender
> > > > log4j.appender.R.File=app.log
> > > >
> > > > log4j.appender.R.layout=org.apache.log4j.PatternLayout
> > > > log4j.appender.R.layout.ConversionPattern=%d %-5p %c - %m%n
> > > >
> > > > # Vary level for packages log4j.logger.org.springframework=ERROR
> > > >
> > > > And here's the bit of my initialisation code in my Junit setUp:
> > > >
> > > > protected void setUp() throws Exception {
> > > >
> > > > PropertyConfigurator.configure("c:/Projects/FETServer/conf/log4j.p
> > > > ro
> > > > pert
> > > > ies");
> > > > // initialise datasource
> > > > _logger.info("One-time setUp()");
> > > > _logger.info("intializing connection...");
> > > > dataSource = new SingleConnectionDataSource();
> > > > dataSource.setDriverClassName(
> > > > "oracle.jdbc.driver.OracleDriver");
> > > > dataSource.setUrl(
> > > > "jdbc:oracle:thin:@132.25.50.69:1521:ORCL01");
> > > > dataSource.setUsername("scott");
> > > > dataSource.setPassword("tiger");
> > > >
> > > > dao = new SampleDao(dataSource);
> > > > }
> > > >
> > > > And here's whats going to the console:
> > > >
> > > > *** configurationOptionStr=null
> > > > ** End

Re: writing logs into multiple files

2005-09-29 Thread rusty+commons
I use the following.  Is using the 
org.apache.log4j.varia.LevelMatchFilter a better way log to different 
places?





http://jakarta.apache.org/log4j/";>
   
   
   
   
   

   
   
   
   
   
   
   
   
   

   
   
   
   
   
   

   
   
   
   
   
   
   

   
   
   
   
   




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Logging to DB2 error

2005-09-29 Thread Dominique Paquin

Hello all,

I'm trying to log to a DB2 server, I can access this server with my 
SQuireL client as well as the DB2 adminstraftion console and navigate in 
the table where I wish to log to, so I know it is accessible.


*This is my log4j configuration :*
--
*log4j.rootLogger*=INFO, extlog
*log4j.logger.com.okiok.gt*=INFO,loggingdb

*log4j.appender.extlog=*...

*log4j.appender.loggingdb*=org.apache.log4j.jdbcplus.JDBCAppender
*log4j.appender.loggingdb.url*=jdbc:db2://localhost/OKIOK
*log4j.appender.loggingdb.dbclass*=COM.ibm.db2.jdbc.app.DB2Driver
*log4j.appender.loggingdb.username*=db2admin
*log4j.appender.loggingdb.password*=password
*log4j.appender.loggingdb.sql*=INSERT INTO LOGGING (timestmp, priority, 
msg) VALUES ('@TIMESTAMP@', '@PRIO@', '@MSG@')

*log4j.appender.loggingdb.buffer*=1
*log4j.appender.loggingdb.layout*=org.apache.log4j.PatternLayout

I found the jdbc classes in the DB2 installation folder located here : 
C:\Program Files\IBM\SQLLIB\java\db2java.zip
So I unziped all this in my eclipse and added the Class Folder to the 
project's java build path


What I get when I try to log an info is this stack trace: *(Any clues?)*
+++
/log4j:ERROR JDBCAppender::flush_buffer(), :
java.sql.SQLException: No suitable driver
   at java.sql.DriverManager.getConnection(DriverManager.java:532)
   at java.sql.DriverManager.getConnection(DriverManager.java:171)
   at 
org.apache.log4j.jdbcplus.JDBCDefaultConnectionHandler.getConnection(JDBCAppender.java:1088)
   at 
org.apache.log4j.jdbcplus.JDBCDefaultConnectionHandler.getConnection(JDBCAppender.java:1064)
   at 
org.apache.log4j.jdbcplus.JDBCLogger.prepareConnection(JDBCLogger.java:458)

   at org.apache.log4j.jdbcplus.JDBCLogger.append(JDBCLogger.java:519)
   at 
org.apache.log4j.jdbcplus.JDBCAppender.flush_buffer(JDBCAppender.java:786)

   at org.apache.log4j.jdbcplus.JDBCAppender.append(JDBCAppender.java:766)
   at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
   at 
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)

   at org.apache.log4j.Category.callAppenders(Category.java:203)
   at org.apache.log4j.Category.forcedLog(Category.java:388)
   at org.apache.log4j.Category.info(Category.java:663)
   at 
com.okiok.gt.services.admin.explorer.ResourceExplorerImpl.start(ResourceExplorerImpl.java:125)
   at 
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:299)
   at 
org.apache.avalon.fortress.impl.handler.ComponentFactory.newInstance(ComponentFactory.java:182)
   at 
org.apache.avalon.fortress.impl.factory.WrapperObjectFactory.newInstance(WrapperObjectFactory.java:60)
   at 
org.apache.avalon.fortress.impl.handler.AbstractComponentHandler.newComponent(AbstractComponentHandler.java:246)
   at 
org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler.doPrepare(ThreadSafeComponentHandler.java:40)
   at 
org.apache.avalon.fortress.impl.handler.AbstractComponentHandler.prepareHandler(AbstractComponentHandler.java:147)
   at 
org.apache.avalon.fortress.impl.handler.LEAwareComponentHandler.prepareHandler(LEAwareComponentHandler.java:85)
   at 
org.apache.avalon.fortress.impl.handler.PrepareHandlerCommand.execute(PrepareHandlerCommand.java:66)
   at 
org.apache.excalibur.event.command.CommandManager$CommandEventHandler.handleEvent(CommandManager.java:293)
   at 
org.apache.excalibur.event.command.CommandManager$CommandEventHandler.handleEvents(CommandManager.java:225)
   at 
org.apache.excalibur.event.command.AbstractThreadManager$PipelineRunner.run(AbstractThreadManager.java:276)
   at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)

   at java.lang.Thread.run(Thread.java:534)/


Re: Logging to DB2 error

2005-09-29 Thread Dominique Paquin
Please note that the stars(*) were not inserted there by me but possibly 
by the maling list server


Dominique Paquin wrote:


Hello all,

I'm trying to log to a DB2 server, I can access this server with my 
SQuireL client as well as the DB2 adminstraftion console and navigate 
in the table where I wish to log to, so I know it is accessible.


*This is my log4j configuration :*
--
*log4j.rootLogger*=INFO, extlog
*log4j.logger.com.okiok.gt*=INFO,loggingdb

*log4j.appender.extlog=*...

*log4j.appender.loggingdb*=org.apache.log4j.jdbcplus.JDBCAppender
*log4j.appender.loggingdb.url*=jdbc:db2://localhost/OKIOK
*log4j.appender.loggingdb.dbclass*=COM.ibm.db2.jdbc.app.DB2Driver
*log4j.appender.loggingdb.username*=db2admin
*log4j.appender.loggingdb.password*=password
*log4j.appender.loggingdb.sql*=INSERT INTO LOGGING (timestmp, 
priority, msg) VALUES ('@TIMESTAMP@', '@PRIO@', '@MSG@')

*log4j.appender.loggingdb.buffer*=1
*log4j.appender.loggingdb.layout*=org.apache.log4j.PatternLayout

I found the jdbc classes in the DB2 installation folder located here : 
C:\Program Files\IBM\SQLLIB\java\db2java.zip
So I unziped all this in my eclipse and added the Class Folder to the 
project's java build path


What I get when I try to log an info is this stack trace: *(Any clues?)*
+++ 


/log4j:ERROR JDBCAppender::flush_buffer(), :
java.sql.SQLException: No suitable driver
   at java.sql.DriverManager.getConnection(DriverManager.java:532)
   at java.sql.DriverManager.getConnection(DriverManager.java:171)
   at 
org.apache.log4j.jdbcplus.JDBCDefaultConnectionHandler.getConnection(JDBCAppender.java:1088) 

   at 
org.apache.log4j.jdbcplus.JDBCDefaultConnectionHandler.getConnection(JDBCAppender.java:1064) 

   at 
org.apache.log4j.jdbcplus.JDBCLogger.prepareConnection(JDBCLogger.java:458) 


   at org.apache.log4j.jdbcplus.JDBCLogger.append(JDBCLogger.java:519)
   at 
org.apache.log4j.jdbcplus.JDBCAppender.flush_buffer(JDBCAppender.java:786) 

   at 
org.apache.log4j.jdbcplus.JDBCAppender.append(JDBCAppender.java:766)
   at 
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
   at 
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65) 


   at org.apache.log4j.Category.callAppenders(Category.java:203)
   at org.apache.log4j.Category.forcedLog(Category.java:388)
   at org.apache.log4j.Category.info(Category.java:663)
   at 
com.okiok.gt.services.admin.explorer.ResourceExplorerImpl.start(ResourceExplorerImpl.java:125) 

   at 
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:299) 

   at 
org.apache.avalon.fortress.impl.handler.ComponentFactory.newInstance(ComponentFactory.java:182) 

   at 
org.apache.avalon.fortress.impl.factory.WrapperObjectFactory.newInstance(WrapperObjectFactory.java:60) 

   at 
org.apache.avalon.fortress.impl.handler.AbstractComponentHandler.newComponent(AbstractComponentHandler.java:246) 

   at 
org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler.doPrepare(ThreadSafeComponentHandler.java:40) 

   at 
org.apache.avalon.fortress.impl.handler.AbstractComponentHandler.prepareHandler(AbstractComponentHandler.java:147) 

   at 
org.apache.avalon.fortress.impl.handler.LEAwareComponentHandler.prepareHandler(LEAwareComponentHandler.java:85) 

   at 
org.apache.avalon.fortress.impl.handler.PrepareHandlerCommand.execute(PrepareHandlerCommand.java:66) 

   at 
org.apache.excalibur.event.command.CommandManager$CommandEventHandler.handleEvent(CommandManager.java:293) 

   at 
org.apache.excalibur.event.command.CommandManager$CommandEventHandler.handleEvents(CommandManager.java:225) 

   at 
org.apache.excalibur.event.command.AbstractThreadManager$PipelineRunner.run(AbstractThreadManager.java:276) 

   at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown 
Source)

   at java.lang.Thread.run(Thread.java:534)/



--
Dominique Paquin
Concepteur Logiciel / Software Designer
_
OKIOK   Solutions de sécurité d'entreprise et d'affaires électroniques
  Enterprise and e-business security solutions

Tel. : (450) 681.1681
http://www.okiok.com 



This e-mail message (including attachments, if any) is intended for the use of 
the individual or entity to which it is addressed and may contain information 
that is privileged, proprietary, confidential and exempt from disclosure.  If 
you are not the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.  If you 
have received this communication in error, please notify the sender and erase 
this e-mail message immediately.

Le présent message électronique (y compris les pièces qui y sont annexées, le 
cas échéant) s'adresse au destinataire indiqué et peut contenir des 
renseignements de caractère privé ou con