log4j+kiwi syslog+tcp

2007-02-02 Thread e120281

i am using kiwi syslog and log4j 1.2.14
below is the xml conf. for syslog.
by this configuration log4j use udp to conncet to the deamon.
i eanble the tcp port of kiwi but i donot know how to say log4j to send
messages over tcp.

 


 
 
 
 
-- 
View this message in context: 
http://www.nabble.com/log4j%2Bkiwi-syslog%2Btcp-tf3159611.html#a8763220
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: Help with DailyRollingFileAppender

2007-02-02 Thread Todd Nine

Thanks for the reply, so are you saying that log4j will only roll the log if
its running at exactly Midnight?

On 2/1/07, James Stauffer <[EMAIL PROTECTED]> wrote:


It may only roll if it isn't stopped.  In order for your test to work
log4j would have to look in the log file to see when the last log was
written or check the modified date of the log file.

On 2/1/07, Todd Nine <[EMAIL PROTECTED]> wrote:
> Hi all,
>   I'm having some trouble with DailyRollingFileAppender.  I'm using
log4j
> 1.2.14, and I'm trying to get the logs to roll at midnight.  I perform
the
> following steps to test log rolling, and they don't appear to be
creating
> the new logs correct.
>
>
>1. I start Tomcat, perform some requests to generate some log data
>2. Stop tomcat
>3. Set my system date to tomorrow
>4. Restart Tomcat and perform more requests to generate logging.
>
> However, the logs don't roll in step 4 as I expect them to.  I have
included
> my log4j.xml, any help would be greatly appreciated.
>
> Thanks,
> Todd
>
> 
> 
> 
> 
> 
>  
> 
> 
>
>
> 
>
> 
> 
> 
>  
> 
> 
>
>
> 
>
> 
> 
> 
>  
> 
> 
>
> 
>
> 
> 
> 
>  
> 
> 
>
> 
> 
> 
> 
>
>
> 
> 
> 
> 
> 
> 
> 
> 
>
>
> 
> 
> 
> 
> 
>
>


--
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: Help with DailyRollingFileAppender

2007-02-02 Thread Todd Nine

Sorry, hit send prematurely.  I have this log4j.xml running on our
production Tomcat server, and the logs don't roll at midnight.  Am I missing
some configuration parameter?  According to the javadocs, I thought I had
supplied all of the required parameters.

Thanks,
Todd

On 2/1/07, James Stauffer <[EMAIL PROTECTED]> wrote:


It may only roll if it isn't stopped.  In order for your test to work
log4j would have to look in the log file to see when the last log was
written or check the modified date of the log file.

On 2/1/07, Todd Nine <[EMAIL PROTECTED]> wrote:
> Hi all,
>   I'm having some trouble with DailyRollingFileAppender.  I'm using
log4j
> 1.2.14, and I'm trying to get the logs to roll at midnight.  I perform
the
> following steps to test log rolling, and they don't appear to be
creating
> the new logs correct.
>
>
>1. I start Tomcat, perform some requests to generate some log data
>2. Stop tomcat
>3. Set my system date to tomorrow
>4. Restart Tomcat and perform more requests to generate logging.
>
> However, the logs don't roll in step 4 as I expect them to.  I have
included
> my log4j.xml, any help would be greatly appreciated.
>
> Thanks,
> Todd
>
> 
> 
> 
> 
> 
>  
> 
> 
>
>
> 
>
> 
> 
> 
>  
> 
> 
>
>
> 
>
> 
> 
> 
>  
> 
> 
>
> 
>
> 
> 
> 
>  
> 
> 
>
> 
> 
> 
> 
>
>
> 
> 
> 
> 
> 
> 
> 
> 
>
>
> 
> 
> 
> 
> 
>
>


--
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: Help with DailyRollingFileAppender

2007-02-02 Thread James Stauffer

I would only expect it to roll if it logs something both before and
after midnight without being restarted.  But I don't know if it is
smart enough to handle other situations.

On 2/2/07, Todd Nine <[EMAIL PROTECTED]> wrote:

Thanks for the reply, so are you saying that log4j will only roll the log if
its running at exactly Midnight?

On 2/1/07, James Stauffer <[EMAIL PROTECTED]> wrote:
>
> It may only roll if it isn't stopped.  In order for your test to work
> log4j would have to look in the log file to see when the last log was
> written or check the modified date of the log file.
>
> On 2/1/07, Todd Nine <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >   I'm having some trouble with DailyRollingFileAppender.  I'm using
> log4j
> > 1.2.14, and I'm trying to get the logs to roll at midnight.  I perform
> the
> > following steps to test log rolling, and they don't appear to be
> creating
> > the new logs correct.
> >
> >
> >1. I start Tomcat, perform some requests to generate some log data
> >2. Stop tomcat
> >3. Set my system date to tomorrow
> >4. Restart Tomcat and perform more requests to generate logging.
> >
> > However, the logs don't roll in step 4 as I expect them to.  I have
> included
> > my log4j.xml, any help would be greatly appreciated.
> >
> > Thanks,
> > Todd
> >
> > 
> > 
> > 
> > 
> > 
> >  
> > 
> > 
> >
> >
> > 
> >
> > 
> > 
> > 
> >  
> > 
> > 
> >
> >
> > 
> >
> > 
> > 
> > 
> >  
> > 
> > 
> >
> > 
> >
> > 
> > 
> > 
> >  
> > 
> > 
> >
> > 
> > 
> > 
> > 
> >
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> >
> > 
> > 
> > 
> > 
> > 
> >
> >
>
>
> --
> 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]
>
>





--
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: Help with DailyRollingFileAppender

2007-02-02 Thread James Stauffer

The only think that I notice different from my config is that you have
a dot at the end of the filename that probably isn't needed.  You
could run with -Dlog4j.debug and then system output may have more
info.  Here is a sample that I use:

 
   
   
   
 
   
 


On 2/2/07, Todd Nine <[EMAIL PROTECTED]> wrote:

Sorry, hit send prematurely.  I have this log4j.xml running on our
production Tomcat server, and the logs don't roll at midnight.  Am I missing
some configuration parameter?  According to the javadocs, I thought I had
supplied all of the required parameters.

Thanks,
Todd

On 2/1/07, James Stauffer <[EMAIL PROTECTED]> wrote:
>
> It may only roll if it isn't stopped.  In order for your test to work
> log4j would have to look in the log file to see when the last log was
> written or check the modified date of the log file.
>
> On 2/1/07, Todd Nine <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >   I'm having some trouble with DailyRollingFileAppender.  I'm using
> log4j
> > 1.2.14, and I'm trying to get the logs to roll at midnight.  I perform
> the
> > following steps to test log rolling, and they don't appear to be
> creating
> > the new logs correct.
> >
> >
> >1. I start Tomcat, perform some requests to generate some log data
> >2. Stop tomcat
> >3. Set my system date to tomorrow
> >4. Restart Tomcat and perform more requests to generate logging.
> >
> > However, the logs don't roll in step 4 as I expect them to.  I have
> included
> > my log4j.xml, any help would be greatly appreciated.
> >
> > Thanks,
> > Todd
> >
> > 
> > 
> > 
> > 
> > 
> >  
> > 
> > 
> >
> >
> > 
> >
> > 
> > 
> > 
> >  
> > 
> > 
> >
> >
> > 
> >
> > 
> > 
> > 
> >  
> > 
> > 
> >
> > 
> >
> > 
> > 
> > 
> >  
> > 
> > 
> >
> > 
> > 
> > 
> > 
> >
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> >
> > 
> > 
> > 
> > 
> > 
> >
> >
>
>
> --
> 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]
>
>





--
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+kiwi syslog+tcp

2007-02-02 Thread Kamal Ahmed
Here is another sample log4j config 

Here's a sample configuration element:

  
   
   
   
   
   
   
   

  
  

The Tcp logging (and port) is commented out and is muturally exculsive to
Udp (and port).
 With Kiwi SysLog you
can enable either or both.

Maybe this might give you some ideas

-Kamal.


-Original Message-
From: e120281 [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 02, 2007 3:16 AM
To: log4j-user@logging.apache.org
Subject: log4j+kiwi syslog+tcp


i am using kiwi syslog and log4j 1.2.14
below is the xml conf. for syslog.
by this configuration log4j use udp to conncet to the deamon.
i eanble the tcp port of kiwi but i donot know how to say log4j to send
messages over tcp.





 
 
 
 
-- 
View this message in context:
http://www.nabble.com/log4j%2Bkiwi-syslog%2Btcp-tf3159611.html#a8763220
Sent from the Log4j - Users mailing list archive at Nabble.com.


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

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



programatically read log contents

2007-02-02 Thread Ricardo Trindade

Hi,

   Is there a way to find out the active appenders ? My objective is to 
programatically read the log file.


thanks,
Ricardo


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



Re: programatically read log contents

2007-02-02 Thread James Stauffer

Yes, I believe you can retrieve the appenders from the logger object.
Check the API.

On 2/2/07, Ricardo Trindade <[EMAIL PROTECTED]> wrote:

Hi,

Is there a way to find out the active appenders ? My objective is to
programatically read the log file.

thanks,
Ricardo


-
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]