NSLog doesn't work the way it should.
That may have something to do with the OOLog* stuff.
However, that's about 2.3 THOUSAND lines of code, which I don't really want to go through! I just want to use NSLog.
I saw some #undef NSLog code, but when I try that I get no output either.
*grump*
NSLog?
Moderators: winston, another_commander
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: NSLog?
I am not working on a Mac, but although I don't see why NSLog() would fail, maybe you can use OOLog() for what you need to do? OOLog works in a similar way to NSLog, only instead ofcolinh wrote:NSLog doesn't work the way it should.
That may have something to do with the OOLog* stuff.
However, that's about 2.3 THOUSAND lines of code, which I don't really want to go through! I just want to use NSLog.
I saw some #undef NSLog code, but when I try that I get no output either.
*grump*
[b]NSLog(@"This is a message");[/b]
you would use [b]OOLog(@"LogClassOfMyMessage", @"This is a message");[/b]
.- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: NSLog?
NSLogs will turn up in the log as “[unclassified]” messages if you’ve included OOLogging.h, and “[system]” messages if you call the real NSLog. (In GNUstep builds, real NSLog calls are labelled “[gnustep]”.)
I suspect that what you really want is to see log messages in the Xcode console, which you can get with
I suspect that what you really want is to see log messages in the Xcode console, which you can get with
defaults write org.aegidian.oolite [url=http://wiki.alioth.net/index.php/Hidden_Settings_in_Oolite]logging-echo-to-stderr[/url] -bool true
in the terminal. (Or select “Echo log to stderr” in Secrets.prefpane.)
Last edited by JensAyton on Tue Jan 18, 2011 2:42 pm, edited 1 time in total.
Reason: Corrected defaults command params.
Reason: Corrected defaults command params.
E-mail: [email protected]
Re: NSLog?
Yes, thanks, that's what I wanted.I suspect that what you really want is to see log messages in the Xcode console
And thanks for the link to the Secret Hidden Settings page!
I hadn't even found/looked for the Elite Wiki
Just out of interest, is the Hidden Settings Page linked to from the Oolite Main Page? I didn't see it offhand But then, it wouldn't be much of a hidden secret hidden settings page, if it were...
Key: logging-echo-to-stderr
Type: boolean
Default: NO
If set to YES, log messages are written to the standard error output as well as the log file.
I know it must look like I'm being deliberately thick/lazy, (it's always like that when getting into a new project ) but, where is this log file? I've looked in ~, /, /var/log/, ~/Documents, ~/oolite-saves and a bit in ~/developer/oolite/ and /opt/var/local...NSLogs will turn up in the log as “[unclassified]” messages if you’ve included OOLogging.h, and “[system]” messages if you call the real NSLog.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: NSLog?
~/Library/Logs/Oolite/Latest.log. Or Show Log in the debug menu. :-)colinh wrote:I know it must look like I'm being deliberately thick/lazy, (it's always like that when getting into a new project :-( ) but, where is this log file? I've looked in ~, /, /var/log/, ~/Documents, ~/oolite-saves and a bit in ~/developer/oolite/ and /opt/var/local...
E-mail: [email protected]
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: NSLog?
You could try the link tocolinh wrote:Just out of interest, is the Hidden Settings Page linked to from the Oolite Main Page? I didn't see it offhand
Hidden Settings in Oolite
from the Oolite Main Index.