discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSLog suddenly mirroring to /var/log/user.log, /var/log/warnings, an


From: Richard Frith-Macdonald
Subject: Re: NSLog suddenly mirroring to /var/log/user.log, /var/log/warnings, and /var/log/syslog
Date: Thu, 4 Aug 2016 15:38:05 +0100

> On 4 Aug 2016, at 15:31, Richard Frith-Macdonald 
> <richard.frith-macdonald@brainstorm.co.uk> wrote:
> 
> 
>> On 4 Aug 2016, at 15:16, Lobron, David <dlobron@akamai.com> wrote:
>> 
>> Hi All,
>> 
>> I have an application that sends NSLog output to a custom location.  A few 
>> days ago, the log lines suddenly started mirroring to /var/log/user.log, 
>> /var/log/warnings, and /var/log/syslog.  I did not make any changes to my 
>> program or the GNUStep runtime.  From a read of the NSLog docs, it seems 
>> like this should not be able to happen.  Has anyone seen this before?  
> 
> 
> I would be surprised if it's being mirrored (identical copies), but it seems 
> quite likely that you are seeing output from syslog.
> 
> NSLog() will produce log output via syslog if *either* the GSLogSyslog user 
> default is set *or* if the attempt to write to stderr fails.
> 
> So I would guess someone changed your user default or, something closed 
> stderr, or stderr is pointing to something that's unwritable (eg a full 
> filesystem).

PS. I guess the documentation is a little obscure ... the NSLog() documentation 
points you to NSLogv(), which points you to _NSLog_printf_handler, which 
describes the exact algorithm used for logging ... or you can read the source 
:-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]