ASLExpireTime Format?
ASLExpireTime Format?
- Subject: ASLExpireTime Format?
- From: Karl Moskowski <email@hidden>
- Date: Mon, 1 Dec 2008 09:24:12 -0500
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