On Oct 23, 2008, at 16:27 , Chris Markle wrote:

Thanks guys. Good advice. Here's my summary of what you guys said:

1. Document to read: Low-Level File Management Programming Topics:
Locating Directories on the System
(http://developer.apple.com/documentation/Cocoa/Conceptual/LowLevelFileMgmt/Tasks/LocatingDirectories.html )

2. Putting logs into the ~/Library/Logs folder is a good choice. The
user running the application is more likely to have permission to
write files in that folder. People may be annoyed if  apps drop files
outside of the user's home directory.

Yeah, I agree... if you have to write logs somewhere and you're not
some kind or root-daemon port, I would go for ~/Library/Logs or Application Support
as noted in Chris's #4.

3. Don't put logs in ~/Documents, as a some programs do.

Never do that... I hate it when programs do that... I delete the program
usually unless I absolutely need it when they do that!

4. One could consider as well: ~/Library/Application
Support/<app_name>/* .  It all depends on the sort of log, intended
use, length of keep, size, etc... (On my system, the files in here
look to be more like DB's, etc. as opposed to something transient like
a log file; moreover, ~/Library/Logs looks to be used specifically for
this purpose by some number of apps on my system.) Still, it's worth
noting the existence of this other directory.

Why not use ASL for logging? It's worked really well for me. I also have
an Obj-C class you can use that wraps ASL if you want.

Jason

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to