[uae] Re: Logging terminal output for OS X Cocoa

  • From: Steven Saunders <s_j_nevets@xxxxxxxxxxxx>
  • To: E-UAE Mailing List <uae@xxxxxxxxxxxxx>
  • Date: Thu, 4 May 2006 17:23:40 +1000 (EST)

> The problem that we're trying to solve here is that
> when E-UAE is launched from your desktop rather
> than a shell, the log output goes to /dev/null.

Not exactly. It actually goes to the console, so you can see it if
you launch the 'Console' application, which can usually be found in
/Applications/Utilities. It's even possible to launch 'Console' after
E-UAE has crashed or been exited and see what the output was. You can
also cut and paste from the 'Console' app, in case you want to
include some of the output in a mail to this list, for example.

This seems to me like it's probably all that's required, although I
can see how a log file would be helpful in some situations.

> In the cases where we can detect whether an
> application has been launched from the desktop
> (and this possible for most desktop environments,
> I think - certainly OS X Finder, AmigaOS WB, etc.)
> we could automatically log to a file, but the
> problem then is choosing an appropriate file path
> for the log file.

The SDL-main file we're using sets a global flag called gFinderLaunch
to true if the app was lanuched from the finder, as opposed to a
shell launch, so this can easily be detected. The cocoa-ui code makes
use of this, for example. 

I think the most appropriate place to put the log would be in
~/Library/Logs. This would be consistent with what Apple applications
(and some third party Mac OS X apps) do. It should be named something
like "E-UAE.log", or perhaps "E-UAE stdout.log".
__
Steve




Send instant messages to your online friends http://au.messenger.yahoo.com 

Other related posts: