RE: how to detect logger is unable to write to file?

2015-10-29 Thread Nicholas Duane
It doesn't ring a bell.  I'll look again more thoroughly to see if I can find 
what I think I saw.

Thanks,
Nick

> Subject: Re: how to detect logger is unable to write to file?
> From: remko.po...@gmail.com
> Date: Fri, 30 Oct 2015 09:30:46 +0900
> To: log4j-user@logging.apache.org
> 
> With Async Loggers you can set an ExceptionHandler. Is that what you mean?
> 
> Sent from my iPhone
> 
> > On 2015/10/30, at 9:07, Nicholas Duane  wrote:
> > 
> > I could have sworn I saw some way to provide a sink for log4j2 (or maybe it 
> > was log4net) internal events.  I just did a quick search and couldn't find 
> > anything.  Is there such a mechanism?  If so, couldn't this be a way for 
> > you to at least capture internal errors which are not bubbled up through 
> > the logging API?  You could then forward these events to the platform 
> > logging mechanism.
> > 
> > Thanks,
> > Nick
> > 
> >> Subject: Re: how to detect logger is unable to write to file?
> >> From: ralph.go...@dslextreme.com
> >> Date: Thu, 29 Oct 2015 14:11:46 -0700
> >> To: log4j-user@logging.apache.org
> >> 
> >> That feature is only in Log4j 2.
> >> 
> >> Ralph
> >> 
> >>> On Oct 29, 2015, at 1:18 PM, degenaro  wrote:
> >>> 
> >>> This a quota on the filesystem.  Writes are blocked when the total
> >>> permitted bytes for the user is exceeded.  It looks like log4j2 might help
> >>> if an exception is being thrown.  I see that one can specify
> >>> ignoreException="false".
> >>> 
> >>> We currently have log4j (not log4j2).  Is there the equivalent or is the
> >>> new function in 2 only?
> >>> 
> >>> Lou.
> >>> 
> >>> On Thu, Oct 29, 2015 at 4:09 PM, John St. Ledger [via Apache Logging] <
> >>> ml-node+s6191n59129...@n7.nabble.com> wrote:
> >>> 
>  Lou,
>  
>  I don't know if this will help, but it is a daily rolling file appender
>  that keeps a maximum of 6 log files. Rollover occurs at midnight, and if
>  more that 6 log files exist, then the oldest is deleted.
>  
>  You still can't tell if the logger fails to write to a file, but if your
>  quota is number of files, then this approach might help.
>  
>  John
>  
>  *John W St. Ledger*
>  
>  Los Alamos National Laboratory
>  
>  
>  From: Matt Sicker <[hidden email]
>  >
>  Reply-To: Log4J Users List <[hidden email]
>  >
>  Date: Thursday, October 29, 2015 2:32 PM
>  To: Log4J Users List <[hidden email]
>  >
>  Subject: Re: how to detect logger is unable to write to file?
>  
>  There's the FailoverAppender <
>  http://logging.apache.org/log4j/2.x/manual/appenders.html#FailoverAppender
>  that gives you a way to automatically switch to a different appender when
>  the primary one errs.
>  
>  On 29 October 2015 at 12:21, degenaro <[hidden email]
>  > wrote:
>  
>  We use log4j with rolling appenders for daemons that run 24x7.  The 
>  daemons
>  run as a user on linux and the log files are written to a filesystem that
>  has a quota.  Normally this works great.  Once in a while (usually due to
>  human error) the quota is exceeded.  This, unfortunately, prevents the
>  daemons from writing their logs...worst of all silently.  There is no
>  indication that anything is wrong!
>  
>  So my question is: how do we configure log4j so that when logging (to 
>  file)
>  fails the daemon can find out and take appropriate action?
>  
>  
>  
>  --
>  View this message in context:
>  
>  http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.html
>  Sent from the Log4j - Users mailing list archive at Nabble.com.
>  
>  -
>  To unsubscribe, e-mail: [hidden email]
>  
>  For additional commands, e-mail: [hidden email]
>  
>  
>  
>  
>  
>  --
>  Matt Sicker <[hidden email]
>  >
>  
>  
>  
>  -
>  To unsubscribe, e-mail: [hidden email]
>  
>  For additional commands, e-mail: [hidden email]
>  
>  
>  --
>  If you reply to this email, your message will be added to the discussion
>  below:
>  
>  http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123p59129.html
>  To unsubscribe

Re: how to detect logger is unable to write to file?

2015-10-29 Thread Remko Popma
With Async Loggers you can set an ExceptionHandler. Is that what you mean?

Sent from my iPhone

> On 2015/10/30, at 9:07, Nicholas Duane  wrote:
> 
> I could have sworn I saw some way to provide a sink for log4j2 (or maybe it 
> was log4net) internal events.  I just did a quick search and couldn't find 
> anything.  Is there such a mechanism?  If so, couldn't this be a way for you 
> to at least capture internal errors which are not bubbled up through the 
> logging API?  You could then forward these events to the platform logging 
> mechanism.
> 
> Thanks,
> Nick
> 
>> Subject: Re: how to detect logger is unable to write to file?
>> From: ralph.go...@dslextreme.com
>> Date: Thu, 29 Oct 2015 14:11:46 -0700
>> To: log4j-user@logging.apache.org
>> 
>> That feature is only in Log4j 2.
>> 
>> Ralph
>> 
>>> On Oct 29, 2015, at 1:18 PM, degenaro  wrote:
>>> 
>>> This a quota on the filesystem.  Writes are blocked when the total
>>> permitted bytes for the user is exceeded.  It looks like log4j2 might help
>>> if an exception is being thrown.  I see that one can specify
>>> ignoreException="false".
>>> 
>>> We currently have log4j (not log4j2).  Is there the equivalent or is the
>>> new function in 2 only?
>>> 
>>> Lou.
>>> 
>>> On Thu, Oct 29, 2015 at 4:09 PM, John St. Ledger [via Apache Logging] <
>>> ml-node+s6191n59129...@n7.nabble.com> wrote:
>>> 
 Lou,
 
 I don't know if this will help, but it is a daily rolling file appender
 that keeps a maximum of 6 log files. Rollover occurs at midnight, and if
 more that 6 log files exist, then the oldest is deleted.
 
 You still can't tell if the logger fails to write to a file, but if your
 quota is number of files, then this approach might help.
 
 John
 
 *John W St. Ledger*
 
 Los Alamos National Laboratory
 
 
 From: Matt Sicker <[hidden email]
 >
 Reply-To: Log4J Users List <[hidden email]
 >
 Date: Thursday, October 29, 2015 2:32 PM
 To: Log4J Users List <[hidden email]
 >
 Subject: Re: how to detect logger is unable to write to file?
 
 There's the FailoverAppender <
 http://logging.apache.org/log4j/2.x/manual/appenders.html#FailoverAppender
 that gives you a way to automatically switch to a different appender when
 the primary one errs.
 
 On 29 October 2015 at 12:21, degenaro <[hidden email]
 > wrote:
 
 We use log4j with rolling appenders for daemons that run 24x7.  The daemons
 run as a user on linux and the log files are written to a filesystem that
 has a quota.  Normally this works great.  Once in a while (usually due to
 human error) the quota is exceeded.  This, unfortunately, prevents the
 daemons from writing their logs...worst of all silently.  There is no
 indication that anything is wrong!
 
 So my question is: how do we configure log4j so that when logging (to file)
 fails the daemon can find out and take appropriate action?
 
 
 
 --
 View this message in context:
 
 http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.html
 Sent from the Log4j - Users mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: [hidden email]
 
 For additional commands, e-mail: [hidden email]
 
 
 
 
 
 --
 Matt Sicker <[hidden email]
 >
 
 
 
 -
 To unsubscribe, e-mail: [hidden email]
 
 For additional commands, e-mail: [hidden email]
 
 
 --
 If you reply to this email, your message will be added to the discussion
 below:
 
 http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123p59129.html
 To unsubscribe from how to detect logger is unable to write to file?, click
 here
 
 .
 NAML
 

Re: how to detect logger is unable to write to file?

2015-10-29 Thread Remko Popma
That's a log4j-1.2 system property. 

Sent from my iPhone

> On 2015/10/30, at 9:22, Priya Ahuja  wrote:
> 
> The closest I could find was to use -Dlog4j.debug, this will put
> (configuration) errors with appenders on the console.
> 
>> On Thu, Oct 29, 2015 at 5:17 PM, Ralph Goers  
>> wrote:
>> Did you specify ignoreException=false?
>> 
>> Ralph
>> 
>>> On Oct 29, 2015, at 4:06 PM, Priya Ahuja  wrote:
>>> 
>>> I am seeing a similar issue with log4j2, is there any log that
>>> contains the error that log4j was not able to write to file?
>>> 
 On Thu, Oct 29, 2015 at 3:53 PM, Remko Popma  wrote:
 What action should the daemon take when its quota is reached?
 
 Sent from my iPhone
 
> On 2015/10/30, at 2:21, degenaro  wrote:
> 
> We use log4j with rolling appenders for daemons that run 24x7.  The 
> daemons
> run as a user on linux and the log files are written to a filesystem that
> has a quota.  Normally this works great.  Once in a while (usually due to
> human error) the quota is exceeded.  This, unfortunately, prevents the
> daemons from writing their logs...worst of all silently.  There is no
> indication that anything is wrong!
> 
> So my question is: how do we configure log4j so that when logging (to 
> file)
> fails the daemon can find out and take appropriate action?
> 
> 
> 
> --
> View this message in context: 
> http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.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
 
 -
 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
>> 
>> 
>> 
>> -
>> 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
> 

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



Re: how to detect logger is unable to write to file?

2015-10-29 Thread Priya Ahuja
The closest I could find was to use -Dlog4j.debug, this will put
(configuration) errors with appenders on the console.

On Thu, Oct 29, 2015 at 5:17 PM, Ralph Goers  wrote:
> Did you specify ignoreException=false?
>
> Ralph
>
>> On Oct 29, 2015, at 4:06 PM, Priya Ahuja  wrote:
>>
>> I am seeing a similar issue with log4j2, is there any log that
>> contains the error that log4j was not able to write to file?
>>
>> On Thu, Oct 29, 2015 at 3:53 PM, Remko Popma  wrote:
>>> What action should the daemon take when its quota is reached?
>>>
>>> Sent from my iPhone
>>>
 On 2015/10/30, at 2:21, degenaro  wrote:

 We use log4j with rolling appenders for daemons that run 24x7.  The daemons
 run as a user on linux and the log files are written to a filesystem that
 has a quota.  Normally this works great.  Once in a while (usually due to
 human error) the quota is exceeded.  This, unfortunately, prevents the
 daemons from writing their logs...worst of all silently.  There is no
 indication that anything is wrong!

 So my question is: how do we configure log4j so that when logging (to file)
 fails the daemon can find out and take appropriate action?



 --
 View this message in context: 
 http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.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

>>>
>>> -
>>> 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
>>
>>
>
>
>
> -
> 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: how to detect logger is unable to write to file?

2015-10-29 Thread Ralph Goers
Did you specify ignoreException=false?

Ralph

> On Oct 29, 2015, at 4:06 PM, Priya Ahuja  wrote:
> 
> I am seeing a similar issue with log4j2, is there any log that
> contains the error that log4j was not able to write to file?
> 
> On Thu, Oct 29, 2015 at 3:53 PM, Remko Popma  wrote:
>> What action should the daemon take when its quota is reached?
>> 
>> Sent from my iPhone
>> 
>>> On 2015/10/30, at 2:21, degenaro  wrote:
>>> 
>>> We use log4j with rolling appenders for daemons that run 24x7.  The daemons
>>> run as a user on linux and the log files are written to a filesystem that
>>> has a quota.  Normally this works great.  Once in a while (usually due to
>>> human error) the quota is exceeded.  This, unfortunately, prevents the
>>> daemons from writing their logs...worst of all silently.  There is no
>>> indication that anything is wrong!
>>> 
>>> So my question is: how do we configure log4j so that when logging (to file)
>>> fails the daemon can find out and take appropriate action?
>>> 
>>> 
>>> 
>>> --
>>> View this message in context: 
>>> http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.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
>>> 
>> 
>> -
>> 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
> 
> 



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



RE: how to detect logger is unable to write to file?

2015-10-29 Thread Nicholas Duane
I could have sworn I saw some way to provide a sink for log4j2 (or maybe it was 
log4net) internal events.  I just did a quick search and couldn't find 
anything.  Is there such a mechanism?  If so, couldn't this be a way for you to 
at least capture internal errors which are not bubbled up through the logging 
API?  You could then forward these events to the platform logging mechanism.

Thanks,
Nick

> Subject: Re: how to detect logger is unable to write to file?
> From: ralph.go...@dslextreme.com
> Date: Thu, 29 Oct 2015 14:11:46 -0700
> To: log4j-user@logging.apache.org
> 
> That feature is only in Log4j 2.
> 
> Ralph
> 
> > On Oct 29, 2015, at 1:18 PM, degenaro  wrote:
> > 
> > This a quota on the filesystem.  Writes are blocked when the total
> > permitted bytes for the user is exceeded.  It looks like log4j2 might help
> > if an exception is being thrown.  I see that one can specify
> > ignoreException="false".
> > 
> > We currently have log4j (not log4j2).  Is there the equivalent or is the
> > new function in 2 only?
> > 
> > Lou.
> > 
> > On Thu, Oct 29, 2015 at 4:09 PM, John St. Ledger [via Apache Logging] <
> > ml-node+s6191n59129...@n7.nabble.com> wrote:
> > 
> >> Lou,
> >> 
> >> I don't know if this will help, but it is a daily rolling file appender
> >> that keeps a maximum of 6 log files. Rollover occurs at midnight, and if
> >> more that 6 log files exist, then the oldest is deleted.
> >> 
> >> You still can't tell if the logger fails to write to a file, but if your
> >> quota is number of files, then this approach might help.
> >> 
> >> John
> >> 
> >> *John W St. Ledger*
> >> 
> >> Los Alamos National Laboratory
> >> 
> >> 
> >> From: Matt Sicker <[hidden email]
> >> >
> >> Reply-To: Log4J Users List <[hidden email]
> >> >
> >> Date: Thursday, October 29, 2015 2:32 PM
> >> To: Log4J Users List <[hidden email]
> >> >
> >> Subject: Re: how to detect logger is unable to write to file?
> >> 
> >> There's the FailoverAppender <
> >> http://logging.apache.org/log4j/2.x/manual/appenders.html#FailoverAppender
> >>> 
> >> that gives you a way to automatically switch to a different appender when
> >> the primary one errs.
> >> 
> >> On 29 October 2015 at 12:21, degenaro <[hidden email]
> >> > wrote:
> >> 
> >> We use log4j with rolling appenders for daemons that run 24x7.  The daemons
> >> run as a user on linux and the log files are written to a filesystem that
> >> has a quota.  Normally this works great.  Once in a while (usually due to
> >> human error) the quota is exceeded.  This, unfortunately, prevents the
> >> daemons from writing their logs...worst of all silently.  There is no
> >> indication that anything is wrong!
> >> 
> >> So my question is: how do we configure log4j so that when logging (to file)
> >> fails the daemon can find out and take appropriate action?
> >> 
> >> 
> >> 
> >> --
> >> View this message in context:
> >> 
> >> http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.html
> >> Sent from the Log4j - Users mailing list archive at Nabble.com.
> >> 
> >> -
> >> To unsubscribe, e-mail: [hidden email]
> >> 
> >> For additional commands, e-mail: [hidden email]
> >> 
> >> 
> >> 
> >> 
> >> 
> >> --
> >> Matt Sicker <[hidden email]
> >> >
> >> 
> >> 
> >> 
> >> -
> >> To unsubscribe, e-mail: [hidden email]
> >> 
> >> For additional commands, e-mail: [hidden email]
> >> 
> >> 
> >> --
> >> If you reply to this email, your message will be added to the discussion
> >> below:
> >> 
> >> http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123p59129.html
> >> To unsubscribe from how to detect logger is unable to write to file?, click
> >> here
> >> 
> >> .
> >> NAML
> >> 
> >> 
> > 
> > 
> > 
> > 
> > --
> > View this message in context: 
> 

Re: how to detect logger is unable to write to file?

2015-10-29 Thread Priya Ahuja
I am seeing a similar issue with log4j2, is there any log that
contains the error that log4j was not able to write to file?

On Thu, Oct 29, 2015 at 3:53 PM, Remko Popma  wrote:
> What action should the daemon take when its quota is reached?
>
> Sent from my iPhone
>
>> On 2015/10/30, at 2:21, degenaro  wrote:
>>
>> We use log4j with rolling appenders for daemons that run 24x7.  The daemons
>> run as a user on linux and the log files are written to a filesystem that
>> has a quota.  Normally this works great.  Once in a while (usually due to
>> human error) the quota is exceeded.  This, unfortunately, prevents the
>> daemons from writing their logs...worst of all silently.  There is no
>> indication that anything is wrong!
>>
>> So my question is: how do we configure log4j so that when logging (to file)
>> fails the daemon can find out and take appropriate action?
>>
>>
>>
>> --
>> View this message in context: 
>> http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.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
>>
>
> -
> 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: how to detect logger is unable to write to file?

2015-10-29 Thread Remko Popma
What action should the daemon take when its quota is reached?

Sent from my iPhone

> On 2015/10/30, at 2:21, degenaro  wrote:
> 
> We use log4j with rolling appenders for daemons that run 24x7.  The daemons
> run as a user on linux and the log files are written to a filesystem that
> has a quota.  Normally this works great.  Once in a while (usually due to
> human error) the quota is exceeded.  This, unfortunately, prevents the
> daemons from writing their logs...worst of all silently.  There is no
> indication that anything is wrong!
> 
> So my question is: how do we configure log4j so that when logging (to file)
> fails the daemon can find out and take appropriate action?
> 
> 
> 
> --
> View this message in context: 
> http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.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
> 

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



Re: how to detect logger is unable to write to file?

2015-10-29 Thread Shawn Heisey
On 10/29/2015 11:21 AM, degenaro wrote:
> We use log4j with rolling appenders for daemons that run 24x7.  The daemons
> run as a user on linux and the log files are written to a filesystem that
> has a quota.  Normally this works great.  Once in a while (usually due to
> human error) the quota is exceeded.  This, unfortunately, prevents the
> daemons from writing their logs...worst of all silently.  There is no
> indication that anything is wrong!
>
> So my question is: how do we configure log4j so that when logging (to file)
> fails the daemon can find out and take appropriate action?

Something I would do even if I could find a solution by switching to
log4j2:  Implement a monitor that watches the quotas and sends alerts
when the used space in any quota is nearing capacity.  This is the sort
of general-purpose monitoring that will save you from a lot of headaches.

Thanks,
Shawn


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



Re: how to detect logger is unable to write to file?

2015-10-29 Thread Ralph Goers
That feature is only in Log4j 2.

Ralph

> On Oct 29, 2015, at 1:18 PM, degenaro  wrote:
> 
> This a quota on the filesystem.  Writes are blocked when the total
> permitted bytes for the user is exceeded.  It looks like log4j2 might help
> if an exception is being thrown.  I see that one can specify
> ignoreException="false".
> 
> We currently have log4j (not log4j2).  Is there the equivalent or is the
> new function in 2 only?
> 
> Lou.
> 
> On Thu, Oct 29, 2015 at 4:09 PM, John St. Ledger [via Apache Logging] <
> ml-node+s6191n59129...@n7.nabble.com> wrote:
> 
>> Lou,
>> 
>> I don't know if this will help, but it is a daily rolling file appender
>> that keeps a maximum of 6 log files. Rollover occurs at midnight, and if
>> more that 6 log files exist, then the oldest is deleted.
>> 
>> You still can't tell if the logger fails to write to a file, but if your
>> quota is number of files, then this approach might help.
>> 
>> John
>> 
>> *John W St. Ledger*
>> 
>> Los Alamos National Laboratory
>> 
>> 
>> From: Matt Sicker <[hidden email]
>> >
>> Reply-To: Log4J Users List <[hidden email]
>> >
>> Date: Thursday, October 29, 2015 2:32 PM
>> To: Log4J Users List <[hidden email]
>> >
>> Subject: Re: how to detect logger is unable to write to file?
>> 
>> There's the FailoverAppender <
>> http://logging.apache.org/log4j/2.x/manual/appenders.html#FailoverAppender
>>> 
>> that gives you a way to automatically switch to a different appender when
>> the primary one errs.
>> 
>> On 29 October 2015 at 12:21, degenaro <[hidden email]
>> > wrote:
>> 
>> We use log4j with rolling appenders for daemons that run 24x7.  The daemons
>> run as a user on linux and the log files are written to a filesystem that
>> has a quota.  Normally this works great.  Once in a while (usually due to
>> human error) the quota is exceeded.  This, unfortunately, prevents the
>> daemons from writing their logs...worst of all silently.  There is no
>> indication that anything is wrong!
>> 
>> So my question is: how do we configure log4j so that when logging (to file)
>> fails the daemon can find out and take appropriate action?
>> 
>> 
>> 
>> --
>> View this message in context:
>> 
>> http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.html
>> Sent from the Log4j - Users mailing list archive at Nabble.com.
>> 
>> -
>> To unsubscribe, e-mail: [hidden email]
>> 
>> For additional commands, e-mail: [hidden email]
>> 
>> 
>> 
>> 
>> 
>> --
>> Matt Sicker <[hidden email]
>> >
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: [hidden email]
>> 
>> For additional commands, e-mail: [hidden email]
>> 
>> 
>> --
>> If you reply to this email, your message will be added to the discussion
>> below:
>> 
>> http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123p59129.html
>> To unsubscribe from how to detect logger is unable to write to file?, click
>> here
>> 
>> .
>> NAML
>> 
>> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123p59132.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



Re: how to detect logger is unable to write to file?

2015-10-29 Thread degenaro
This a quota on the filesystem.  Writes are blocked when the total
permitted bytes for the user is exceeded.  It looks like log4j2 might help
if an exception is being thrown.  I see that one can specify
ignoreException="false".

We currently have log4j (not log4j2).  Is there the equivalent or is the
new function in 2 only?

Lou.

On Thu, Oct 29, 2015 at 4:09 PM, John St. Ledger [via Apache Logging] <
ml-node+s6191n59129...@n7.nabble.com> wrote:

> Lou,
>
> I don't know if this will help, but it is a daily rolling file appender
> that keeps a maximum of 6 log files. Rollover occurs at midnight, and if
> more that 6 log files exist, then the oldest is deleted.
>
> You still can't tell if the logger fails to write to a file, but if your
> quota is number of files, then this approach might help.
>
> John
>
> *John W St. Ledger*
>
> Los Alamos National Laboratory
>
>
> From: Matt Sicker <[hidden email]
> >
> Reply-To: Log4J Users List <[hidden email]
> >
> Date: Thursday, October 29, 2015 2:32 PM
> To: Log4J Users List <[hidden email]
> >
> Subject: Re: how to detect logger is unable to write to file?
>
> There's the FailoverAppender <
> http://logging.apache.org/log4j/2.x/manual/appenders.html#FailoverAppender
> >
> that gives you a way to automatically switch to a different appender when
> the primary one errs.
>
> On 29 October 2015 at 12:21, degenaro <[hidden email]
> > wrote:
>
> We use log4j with rolling appenders for daemons that run 24x7.  The daemons
> run as a user on linux and the log files are written to a filesystem that
> has a quota.  Normally this works great.  Once in a while (usually due to
> human error) the quota is exceeded.  This, unfortunately, prevents the
> daemons from writing their logs...worst of all silently.  There is no
> indication that anything is wrong!
>
> So my question is: how do we configure log4j so that when logging (to file)
> fails the daemon can find out and take appropriate action?
>
>
>
> --
> View this message in context:
>
> http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: [hidden email]
> 
> For additional commands, e-mail: [hidden email]
> 
>
>
>
>
> --
> Matt Sicker <[hidden email]
> >
>
>
>
> -
> To unsubscribe, e-mail: [hidden email]
> 
> For additional commands, e-mail: [hidden email]
> 
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123p59129.html
> To unsubscribe from how to detect logger is unable to write to file?, click
> here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123p59132.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

Re: how to detect logger is unable to write to file?

2015-10-29 Thread St Ledger, John W
Lou,

I don't know if this will help, but it is a daily rolling file appender that 
keeps a maximum of 6 log files. Rollover occurs at midnight, and if more that 6 
log files exist, then the oldest is deleted.

You still can't tell if the logger fails to write to a file, but if your quota 
is number of files, then this approach might help.

John

John W St. Ledger
Los Alamos National Laboratory

From: Matt Sicker mailto:boa...@gmail.com>>
Reply-To: Log4J Users List 
mailto:log4j-user@logging.apache.org>>
Date: Thursday, October 29, 2015 2:32 PM
To: Log4J Users List 
mailto:log4j-user@logging.apache.org>>
Subject: Re: how to detect logger is unable to write to file?

There's the FailoverAppender <
http://logging.apache.org/log4j/2.x/manual/appenders.html#FailoverAppender>
that gives you a way to automatically switch to a different appender when
the primary one errs.

On 29 October 2015 at 12:21, degenaro 
mailto:lou.degen...@gmail.com>> wrote:

We use log4j with rolling appenders for daemons that run 24x7.  The daemons
run as a user on linux and the log files are written to a filesystem that
has a quota.  Normally this works great.  Once in a while (usually due to
human error) the quota is exceeded.  This, unfortunately, prevents the
daemons from writing their logs...worst of all silently.  There is no
indication that anything is wrong!

So my question is: how do we configure log4j so that when logging (to file)
fails the daemon can find out and take appropriate action?



--
View this message in context:
http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.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




--
Matt Sicker mailto:boa...@gmail.com>>


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

Re: how to detect logger is unable to write to file?

2015-10-29 Thread Matt Sicker
There's the FailoverAppender <
http://logging.apache.org/log4j/2.x/manual/appenders.html#FailoverAppender>
that gives you a way to automatically switch to a different appender when
the primary one errs.

On 29 October 2015 at 12:21, degenaro  wrote:

> We use log4j with rolling appenders for daemons that run 24x7.  The daemons
> run as a user on linux and the log files are written to a filesystem that
> has a quota.  Normally this works great.  Once in a while (usually due to
> human error) the quota is exceeded.  This, unfortunately, prevents the
> daemons from writing their logs...worst of all silently.  There is no
> indication that anything is wrong!
>
> So my question is: how do we configure log4j so that when logging (to file)
> fails the daemon can find out and take appropriate action?
>
>
>
> --
> View this message in context:
> http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.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
>
>


-- 
Matt Sicker 


how to detect logger is unable to write to file?

2015-10-29 Thread degenaro
We use log4j with rolling appenders for daemons that run 24x7.  The daemons
run as a user on linux and the log files are written to a filesystem that
has a quota.  Normally this works great.  Once in a while (usually due to
human error) the quota is exceeded.  This, unfortunately, prevents the
daemons from writing their logs...worst of all silently.  There is no
indication that anything is wrong!

So my question is: how do we configure log4j so that when logging (to file)
fails the daemon can find out and take appropriate action?



--
View this message in context: 
http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.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