level based logging into seperate files

2007-07-26 Thread Sarvananda

Dear all,

I have a simple question and I have no solution. Did a lot of google and
tried too many things. I am not going where I want to. My only requirement
is : I need to be able to use a logger object and append different levels of
logs into different files (ofcourse the logs should have the classname, time
and the error)(like Warn messages go to warn_log error messages go to
error_log) .  I am completely stuck with this simple thing... may be I just
have too much on my mind.

I would appreciate if someone could help me with this.

Thanks in advance for your time

Regards,


-- 
View this message in context: 
http://www.nabble.com/level-based-logging-into-seperate-files-tf4150902.html#a11808248
Sent from the Log4j - Users mailing list archive at Nabble.com.


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



Re: log4j Manual, where?

2007-07-26 Thread Hans Schwaebli
Wayne interessierts,
   
  so I did not overlook something. The simple fact is that there is no good 
official manual and no good unofficial free manual. It seems that log4j can 
afford that, since not many people jump to other logging frameworks.
  

Wayne Cannon <[EMAIL PROTECTED]> wrote:
  Hans,

I agree with you to a limited extent. The for-a-fee manual 
, or the "Pro Apache Log4j 
" 
book, have indexes; but none of them are really well-organized (like the 
"Ant in Action" book or the online Ant manual you mention). However, 
I've found that the links on the 
"http://logging.apache.org/log4j/docs/documentation.html"; 
page are 
about as thorough as the books or PDF that you have to pay for and some 
are at least as good for a step-by-step tutorial format. The "Don't Use 
System.out.println! Use Log4j 
by Vipan Singla" is 
terse/succinct, but contains a pretty thorough set of examples The book 
is probably best reference for configuring Log4j integrated with a Web 
application (I'm not using it that way; but I say that only because 
there is quite a bit of information in the book on the topic). The book 
also has more information on writing your own custom modules. After 
purchasing both the downloadable manual and the book, I still find 
myself going to the links on the above web page and finding them pretty 
satisfactory, if not well-organized and indexed.

Regards,
Wayne

Hans Schwaebli wrote:
> Why is there no good log4j manual? 
> I can't find it anywhere. If I missed it, please tell me where it is.
> The turk who programmed log4j has written a manual, but it is not free. I am 
> looking for a free manual.
> If you don't know what I mean, I mean something like the Ant manual, where 
> everything is documented.
> Thanks.
> 


   
-
Building a website is a piece of cake. 
Yahoo! Small Business gives you all the tools to get online.

Re: level based logging into seperate files

2007-07-26 Thread James Stauffer
Just create one appender per level and use a LevelFilter to get only
the correct level.  You may find that doing something slightly
different is more useful.  Have each appender have a certain level and
above so that DebugAppender has all messages, InfoAppender has
everything but DEBUG, etc.  I find that when I look through the DEBUG
logs I want to see all higher logs also.

On 7/26/07, Sarvananda <[EMAIL PROTECTED]> wrote:
>
> Dear all,
>
> I have a simple question and I have no solution. Did a lot of google and
> tried too many things. I am not going where I want to. My only requirement
> is : I need to be able to use a logger object and append different levels of
> logs into different files (ofcourse the logs should have the classname, time
> and the error)(like Warn messages go to warn_log error messages go to
> error_log) .  I am completely stuck with this simple thing... may be I just
> have too much on my mind.
>
> I would appreciate if someone could help me with this.
>
> Thanks in advance for your time
>
> Regards,
>
>
> --
> View this message in context: 
> http://www.nabble.com/level-based-logging-into-seperate-files-tf4150902.html#a11808248
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
James Staufferhttp://www.geocities.com/stauffer_james/
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: log4j Manual, where?

2007-07-26 Thread Arthur Blake
You can't complain too much because it's open source and the
contributors don't get paid for it!  If you want a more comprehensive
manual, pitch in and write it yourself, or buy the commercial manual!

I've always thought that the short introduction to log4j at

http://logging.apache.org/log4j/docs/manual.html

was very well written and more than adequate!  It gets you up to speed quickly, 
and for those things you can't figure out there is the javadoc, the code, and 
the mailing list!

I think log4j is better documented than the average open source product.  It's 
pretty well documented!  

By the way, the short introduction is a little bit out of date now.  For 
example,
it doesn't mention that log4j now FIRST looks for an xml file instead
of a properties file.

That one tripped me up recently.



- Original Message 
From: Hans Schwaebli <[EMAIL PROTECTED]>
To: Log4J Users List 
Sent: Thursday, July 26, 2007 9:57:29 AM
Subject: Re: log4j Manual, where?

Wayne interessierts,
   
  so I did not overlook something. The simple fact is that there is no good 
official manual and no good unofficial free manual. It seems that log4j can 
afford that, since not many people jump to other logging frameworks.
  

Wayne Cannon <[EMAIL PROTECTED]> wrote:
  Hans,

I agree with you to a limited extent. The for-a-fee manual 
, or the "Pro Apache Log4j 
" 
book, have indexes; but none of them are really well-organized (like the 
"Ant in Action" book or the online Ant manual you mention). However, 
I've found that the links on the 
"http://logging.apache.org/log4j/docs/documentation.html";; 
page are 
about as thorough as the books or PDF that you have to pay for and some 
are at least as good for a step-by-step tutorial format. The "Don't Use 
System.out.println! Use Log4j 
by Vipan Singla" is 
terse/succinct, but contains a pretty thorough set of examples The book 
is probably best reference for configuring Log4j integrated with a Web 
application (I'm not using it that way; but I say that only because 
there is quite a bit of information in the book on the topic). The book 
also has more information on writing your own custom modules. After 
purchasing both the downloadable manual and the book, I still find 
myself going to the links on the above web page and finding them pretty 
satisfactory, if not well-organized and indexed.

Regards,
Wayne

Hans Schwaebli wrote:
> Why is there no good log4j manual? 
> I can't find it anywhere. If I missed it, please tell me where it is.
> The turk who programmed log4j has written a manual, but it is not free. I am 
> looking for a free manual.
> If you don't know what I mean, I mean something like the Ant manual, where 
> everything is documented.
> Thanks.
> 


   
-
Building a website is a piece of cake. 
Yahoo! Small Business gives you all the tools to get online.






   

Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
Finder tool.
http://autos.yahoo.com/carfinder/

initializing log4j per thread

2007-07-26 Thread zaphod_beeblebrox

Hi All 

  I have a web application ( deployed on weblogic )  which runs jobs in a
quartz scheduler using a simple thread pool, 

  The problem is that each time a worker thread starts a scheduled job i
need to direct logging to a different file

   Each job is a instance of a different class 

 
  

  
-- 
View this message in context: 
http://www.nabble.com/initializing-log4j-per-thread-tf4152297.html#a11812604
Sent from the Log4j - Users mailing list archive at Nabble.com.


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



Re: log4j Manual, where?

2007-07-26 Thread Wayne Cannon
Thanks for the heads-up.  That would eventually catch me by surprise, 
too.  --Wayne


Arthur Blake wrote:

...
By the way, the short introduction is a little bit out of date now.  For 
example,
it doesn't mention that log4j now FIRST looks for an xml file instead
of a properties file.

That one tripped me up recently.
  


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



Re: log4j Manual, where?

2007-07-26 Thread Curt Arnold


On Jul 26, 2007, at 9:53 AM, Arthur Blake wrote:


You can't complain too much because it's open source and the
contributors don't get paid for it!  If you want a more comprehensive
manual, pitch in and write it yourself, or buy the commercial manual!

I've always thought that the short introduction to log4j at

http://logging.apache.org/log4j/docs/manual.html

was very well written and more than adequate!  It gets you up to  
speed quickly, and for those things you can't figure out there is  
the javadoc, the code, and the mailing list!


I think log4j is better documented than the average open source  
product.  It's pretty well documented!


By the way, the short introduction is a little bit out of date  
now.  For example,

it doesn't mention that log4j now FIRST looks for an xml file instead
of a properties file.

That one tripped me up recently.


You can file bugs against the docs and since we are hopefully soon to  
release 1.2.15, the sooner the better.


To build the forthcoming docs, install Maven 2.0.7 then

svn co https://svn.apache.org/repos/asf/logging/log4j/branches/v1_2- 
branch log4j12

cd log4j12
mvn site

The site is generated in target/site

To modify the manual, edit src/site/xdoc/manual.xml and rebuild.   
When you have the change that you want, do


svn diff > bugname.patch

and attach it to a bug filed on the docs.

If anyone else wants to help on docs, please pitch in.  The faq (src/ 
site/fml/faq.xml) might be a good place to add value. 


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



Re: initializing log4j per thread

2007-07-26 Thread James Stauffer
You may have to write your own appender for this.  It would be simliar
to people who want one log per user so you might find good suggestions
in the archive if you search for something like "file per user".

On 7/26/07, zaphod_beeblebrox <[EMAIL PROTECTED]> wrote:
>
> Hi All
>
>   I have a web application ( deployed on weblogic )  which runs jobs in a
> quartz scheduler using a simple thread pool,
>
>   The problem is that each time a worker thread starts a scheduled job i
> need to direct logging to a different file
>
>Each job is a instance of a different class
>
>
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/initializing-log4j-per-thread-tf4152297.html#a11812604
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
James Staufferhttp://www.geocities.com/stauffer_james/
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]