Re: Is there a way to route NSLog to standard out?
Re: Is there a way to route NSLog to standard out?
- Subject: Re: Is there a way to route NSLog to standard out?
- From: petite_abeille <email@hidden>
- Date: Sat, 13 Jul 2002 12:08:15 +0200
On Saturday, July 13, 2002, at 11:55 , Marcel Weiher wrote:
You could redirect stderr to stdout either on invocation using the
shell, or internally using freopen().
However...
...the question suggests that you're misusing NSLog(), because NSLog()
is only intended for informational/debugging diagnostics that go to
stderr, not for data output or the type of logging that goes to stdout.
Talking about "abusing" stderr/stdout, what about "creative" use of
those ANSI color sequence posted by Byron Han:
#define kANSINormal "\x1B[0m"
#define kANSIBright "\x1B[1m"
#define kANSIDim "\x1B[2m"
#define kANSIUnderscore "\x1B[4m"
#define kANSIBlink "\x1B[5m"
#define kANSIReverse "\x1B[7m"
#define kANSIHidden "\x1B[8m"
#define kANSIForeBlack "\x1B[30m"
#define kANSIForeRed "\x1B[31m"
#define kANSIForeGreen "\x1B[32m"
#define kANSIForeYellow "\x1B[33m"
#define kANSIForeBlue "\x1B[34m"
#define kANSIForeMagenta "\x1B[35m"
#define kANSIForeCyan "\x1B[36m"
#define kANSIForeWhite "\x1B[37m"
#define kANSIBackBlack "\x1B[40m"
#define kANSIBackRed "\x1B[41m"
#define kANSIBackGreen "\x1B[42m"
#define kANSIBackYellow "\x1B[43m"
#define kANSIBackBlue "\x1B[44m"
#define kANSIBackMagenta "\x1B[45m"
#define kANSIBackCyan "\x1B[46m"
#define kANSIBackWhite "\x1B[47m"
Cheers,
PA.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.