discuss-gnustep
[Top][All Lists]
Advanced

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

Re: [BUG report] NSLog on Windows!!


From: David Ayers
Subject: Re: [BUG report] NSLog on Windows!!
Date: Wed, 30 Nov 2005 10:43:43 +0100
User-agent: Mozilla Thunderbird 1.0.2 (X11/20051002)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lloyd Dupont schrieb:
> ho, allright.
> probably the write file because it's a GUI application (no console
> attached)
> anyway, I hacked NSLog.m again and put "if ( 0 )" the nice thing is CVS
> seems to take care of keeping my change now.
> 

Hello Lloyd,

could I ask you to keep related mails in the same thread.  It really
helps those of us who plow through lots of mails :-).

It seems that you have found a bug here (independent of whether I
believe the default behavior is good or not :-) ).  It would be really
helpful, if you could find out why the log is being sent.  Richard
spelled pretty much spelled out the code.  I've added some logging for
the interesting information:


BOOL shouldWriteToEventLog = NO;
int testLen;

if (GSUserDefaultsFlag(GSLogSyslog) == YES)
  {
    shouldWriteToEventLog = YES; // default says we should write to
event log
  }
else if ((testLen = write(_NSLogDescriptor, buf, len)) != (int)len)
  {
    fprintf(stderr,
            "write failed: expected %i got %i\n",(int)len,testLen);
    shouldWriteToEventLog = YES;  // write failed ... we should  write
to event log
  }

if (!IsDebuggerPresent())
  {
    shouldWriteToEventLog = NO;  // can't write to event log
  }

Cheers,
David
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDjXRP1Z7XJZzbH3ARApFdAJkB3k6Jy7pU6sAUultnwstsvcXK4ACfbW7R
lQ0YLnfsbyBf7mr82Kxy5YU=
=mPgJ
-----END PGP SIGNATURE-----




reply via email to

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