Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
ASLExpireTime Format?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ASLExpireTime Format?



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@hidden>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>

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

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.