RE: Set Root Log Level on command line

2011-05-25 Thread Andy Flury
Hi Curt

Thanks. does this work in an xml configuration file also? I could not get it
to work so far. 

thanks
andy

-Original Message-
From: Curt Arnold [mailto:curt.ar...@gmail.com] On Behalf Of Curt Arnold
Sent: Mittwoch, 25. Mai 2011 05:56
To: Log4J Users List
Subject: Re: Set Root Log Level on command line

You can specify a system property on the command line and expand it in the
configuration.


java -DrootLevel=INFO ...

and in your configuration file do:

log4j.rootLogger=${rootLevel}


On May 23, 2011, at 2:58 PM, Andy Flury wrote:

 Hi All
 
 
 
 Is there a way to set the root log level on the command line?
 
 
 
 We have an application that runs either in Simulation mode or in Live
mode.
 Depending on the mode, the log level needs to be debug or error. It 
 would be very inconvenient to have two different log4j config files, 
 because all other settings will be constant.
 
 
 
 thanks for your help
 
 andy flury
 


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



RE: [SCL-3] using of system properties in subject of SMTPAppender

2011-05-25 Thread Zbynek Vavros

Hi Heri,

thanks a lot for this advice but if I am correct I can use %X{CUSTOMER}
only in PatternLayout.
Then I need to create my own implementation of SMTPAppender and this is
what i wanted to avoid.
Any chance it can be done without custome implementation?

Thx
   
 Kind Regards / Mit
 freundlichen Grüßen / 
 Üdvözlettel / S   
 pozdravem:
   
   
 Zbynek VAVROS (Embedded
 Development image moved
to file:
   pic16556.gif)
   
 Delivery Centre  616 00, Brno 
  Central Europe  Technicka 21 
Brno SITE Czech Republic   
   
 (Embedded image moved to  
   file: pic29569.gif)Phone: 420-53341- x6283  
  Mobile:  
  E-mail: zbynek_vav...@cz.ibm.com 
   
   
   
   
   IBM Global Services 
  Delivery Center Czech
 Republic, s.r.o.  
   Registered address: 
 Brno, Technicka 2995/21,  
 Zip code: 61600, Company  
   ID: 26244535
  Entered in the   
   Commercial Register 
maintained by the  
  Regional Court in Brno   
  (Part C, Entry 39922)
   
   IBM Global Services 
  Delivery Center Czech
 Republic, s.r.o.  
  Sídlo: Brno, Technická   
  2995/21, PSČ 61600 IČ:   
 26244535  
   Zapsaná v obchodním 
rejstříku, vedeném   
  Krajským soudem v Brně   
  oddíl C, vlozka 39922  
   





|
| From:  |
|
  
--|
  |Bender Heri hben...@ergonomics.ch  
 |
  
--|
|
| To:|
|
  
--|
  |'Log4J Users List' log4j-user@logging.apache.org 
 |
  
--|
|
| Date:  |
|
  
--|
  |05/24/2011 01:18 PM  
  

RE: [SCL-3] using of system properties in subject of SMTPAppender

2011-05-25 Thread Zbynek Vavros

Hi,

thx for advice but since default SMTPAppender does not allow usage of
PatternLayout in subject
I needed to implement this by extedning usual SMTPAppender.
Now it works just fine :)
   
 Kind Regards / Mit
 freundlichen Grüßen / 
 Üdvözlettel / S   
 pozdravem:
   
   
 Zbynek VAVROS (Embedded
 Development image moved
to file:
   pic1.gif)
   
 Delivery Centre  616 00, Brno 
  Central Europe  Technicka 21 
Brno SITE Czech Republic   
   
 (Embedded image moved to  
   file: pic01271.gif)Phone: 420-53341- x6283  
  Mobile:  
  E-mail: zbynek_vav...@cz.ibm.com 
   
   
   
   
   IBM Global Services 
  Delivery Center Czech
 Republic, s.r.o.  
   Registered address: 
 Brno, Technicka 2995/21,  
 Zip code: 61600, Company  
   ID: 26244535
  Entered in the   
   Commercial Register 
maintained by the  
  Regional Court in Brno   
  (Part C, Entry 39922)
   
   IBM Global Services 
  Delivery Center Czech
 Republic, s.r.o.  
  Sídlo: Brno, Technická   
  2995/21, PSČ 61600 IČ:   
 26244535  
   Zapsaná v obchodním 
rejstříku, vedeném   
  Krajským soudem v Brně   
  oddíl C, vlozka 39922  
   





|
| From:  |
|
  
--|
  |Bender Heri hben...@ergonomics.ch  
 |
  
--|
|
| To:|
|
  
--|
  |'Log4J Users List' log4j-user@logging.apache.org 
 |
  
--|
|
| Date:  |
|
  
--|
  |05/24/2011 01:18 PM  
 |
  

Re: TimeAndSizeRollingAppender

2011-05-25 Thread Simon Park
Hi,

Apologies for the late follow-up on this.  I figured it would be helpful to 
provide a feature comparison table so that Log4J users can more easily select 
the rolling Appender that best fits their use case.  The table at 
http://www.simonsite.org.uk/comparison.htm is an attempt to provide an 
objective 
comparison of the most obvious features of the following Appenders:

 - TimeAndSizeRollingAppender
 - Log4J DailyRollingFileAppender
 - Log4J RollingFileAppender
 - Log4J Extras RollingFileAppender

If anyone spots any errors or omissions, please let me know and I'll be happy 
to 
make corrections.

Best Regards,

Simon





From: Simon Park simon_park_m...@yahoo.co.uk
To: Log4J Users List log4j-user@logging.apache.org
Sent: Tue, 19 April, 2011 21:07:19
Subject: Re: TimeAndSizeRollingAppender


Hi Joe,

The Appender is not available in a public Maven repository.  I usually 
recommend 
that users just publish it into their local repository.  There's a POM file on 
my site.

I guess if you take one of the TASRA's sample configurations, and then try to 
do 
the same stuff with Log4J Extras, you'll see what you can and can't do with 
each.  But it really depends upon the features you want to use.  At its most 
basic, you can certainly do the same stuff with the TASRA as you can with Log4J 
Extras.  For some of the more interesting functionality, I think the TASRA is a 
little ahead.

Best Regards,

Simon





From: Joe.Littlejohn joelittlej...@gmail.com
To: log4j-user@logging.apache.org
Sent: Tue, 19 April, 2011 18:24:45
Subject: Re: TimeAndSizeRollingAppender


Simon,

Your appender looks to be exactly what we need. Is this available in a Maven
repo anywhere??

Also, I saw a mention in one of your mails to this group that you made this
appender 'before stumbling on log4j extras'. Does this mean that log4j
extras has an equivalent appender?

Cheers,
Joe




Simon Park wrote:
 
 Hi,
 
 I contributed a TimeAndSizeRollingAppender last year that some people have
 been using.  I have fixed a couple of bugs that  users pointed out and made
 the new code available at http://www.simonsite.org.uk/.
 
 The appender rolls by time, as well as by size, also cleaning up older log
 files using a separate thread.  It's compatible with Log4J 1.2.9 - 1.2.15.
 
 Hopefully this is useful.
 
 Simon
 

-- 
View this message in context: 
http://old.nabble.com/TimeAndSizeRollingAppender-tp21093197p31434636.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Getting Could not find root logger information but I don't see why

2011-05-25 Thread KARR, DAVID (ATTSI)
Using log4j 1.2.16 in WebLogic 10.3.2.

While my app is starting up, I'm seeing the following message:

Log4JInitServlet is initializing log4j
Initializing log4j with: ...\my.ear\my.war\WEB-INF/log4j.xml
log4j: Could not find root logger information. Is this OK?

This is the log4j.xml file it's reading:
-
?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE log4j:configuration SYSTEM http://jakarta.apache.org/log4j.dtd;
log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
appender name=consoleAppender class=org.apache.log4j.ConsoleAppender
layout class=org.apache.log4j.TTCCLayout/
/appender
logger name=org.springframework additivity=false
level value=warn/
appender-ref ref=consoleAppender/
/logger
logger name=org.apache.cxf additivity=false
level value=warn/
appender-ref ref=consoleAppender/
/logger
root
priority value =warn /
appender-ref ref=consoleAppender/
/root
/log4j:configuration
-

I don't see anything wrong with this.

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org