I'm using ASL for logging, and I'm trying to make the messages persist in the main database for at least 30 days. In Peter Hosey's excellent blog series on ASL, there's a description of an undocumented key "ASLExpireTime" to accomplish this.

I'm doing something like this:
NSCalendarDate *ttl = [[NSCalendarDate date] dateByAddingYears:0 months:0 days:30 hours:0 minutes:0 seconds:0];
        aslmsg msg = asl_new(ASL_TYPE_MSG);
asl_set(msg, "ASLExpireTime", [[NSString stringWithFormat:@"%.0f", [ttl timeIntervalSince1970]] UTF8String]);
        asl_log(NULL, msg, level, "%s", [logMessage UTF8String]);

However, it doesn't seem to work. The log messages still get archived every Monday.

Looking over the blog again, there's an implication that "ASLExpireTime" isn't the Unix time (seconds since 1970, like ASL_KEY_TIME), but rather a duration from now. Is that true?

BTW, here's the blog, if anyone's interested:
<http://boredzo.org/blog/archives/2008-01-25/asl-undocumented-keys>

----
Karl Moskowski <[EMAIL PROTECTED]>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>

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