• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ASLExpireTime Format?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Crash when closing window from the menu
  • Next by Date: Re: Crash when closing window from the menu
  • Previous by thread: Re: Crash when closing window from the menu
  • Next by thread: best way to add transitions
  • Index(es):
    • Date
    • Thread