• 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
Re: Missing log output
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing log output


  • Subject: Re: Missing log output
  • From: Alex Zavatone via Cocoa-dev <email@hidden>
  • Date: Tue, 10 Nov 2020 18:22:13 -0600

In the approaches that I used, I logged to a specific file so that I can simply
get that file and send that one.   On iOS, it was simply getting the file from
the docs folder and either using a mailto: URL or using the
MFMailComposeViewController.

I don’t know if you’re on iOS or MacOS.

The other nice thing that you can do is is if you are building in non release
mode, make sure to redirect the output file to
/users/Shared/myAwesomeLogfile.txt and make sure to add a datestamp to the file
name every time you start your app so that you have a log for each app session.




> On Nov 10, 2020, at 4:14 AM, Gabriel Zachmann <email@hidden> wrote:
>
>>
>> For logging, my old logging code was replaced by CocoaLumberjack
>
> A quick glance it it looks interesting.
> Do you know (off the top of your head) whether it puts log message into the
> general syslog?
> That would be nice because it would make it easy to look at the log message
> on my side using the regular console 'show' command.
>
>> which has a max file size and then we would email the log by using
>> MFMailComposeViewController and MFMailComposeViewControllerDelegate.
>
> Would you mind sharing a bit of code?
>

Sure.  I’ll look up the old code for you.

>>
>> If you wanted to filter out all of the lines you wanted, from the system
>> log, you could set up a predicate on the name of your app and return the
>> text that is a log message from your app.  If you want, you can also filter
>> on a timestamp within now to n weeks or months back.
>
> Do you have code for that approach, too?
> (I am mostly working with Objective-C)

Yeah, I’ll look around.
_______________________________________________

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

References: 
 >Re: Missing log output (From: Gabriel Zachmann via Cocoa-dev <email@hidden>)
 >Re: Missing log output (From: Alex Zavatone via Cocoa-dev <email@hidden>)
 >Re: Missing log output (From: Alex Zavatone via Cocoa-dev <email@hidden>)
 >Re: Missing log output (From: Gabriel Zachmann via Cocoa-dev <email@hidden>)

  • Prev by Date: UndoManager, NSManagedObjectContext and sheets
  • Next by Date: How can I get horizontal scrollbars adequate to the widest list entry
  • Previous by thread: Re: Missing log output
  • Next by thread: Re: Missing log output
  • Index(es):
    • Date
    • Thread