• 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: Where do the errors go?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where do the errors go?


  • Subject: Re: Where do the errors go?
  • From: Tom Robinson <email@hidden>
  • Date: Fri, 11 May 2018 18:06:57 +1200

Thanks Chris!  I’ve been using ‘do shell script "logger…’ but this looks nicer.


> On 2018-05-11, at 17:09, Christopher Stone <email@hidden>
> wrote:
>
> On 05/10/2018, at 13:10, Gil Dawson <email@hidden
> <mailto:email@hidden>> wrote:
>> ...but I cannot figure out how to tell Console to display debugging
>> messages.  Using the filter "applet", I scanned down some of the logs listed
>> in the left windowpane.  I found a few entries that contained "applet", but
>> none had the text of the diagnostic messages.
>
>
> Hey Gil,
>
> Axel is logging to a specific file on the Desktop:
>
> ~/Desktop/TestLog.txt
>
> You'd need to open that file in the Console to see any logged events.
>
> If you prefer to use the normal Console log you'd do something like this:
>
> -------------------------------------------------------------
> # Auth: Christopher Stone { Heavy Lifting by Shane Stanley }
> # dCre: 2016/07/25 15:47
> # dMod: 2018/05/10 23:59
> # Appl: AppleScriptObjC
> # Task: Log Text to Console
> # Aojc: True
> # Libs: None
> # Osax: None
> # Tags: @Applescript, @Script, @ASObjC, @Log, @Console
> -------------------------------------------------------------
> use AppleScript
> use framework "AppKit"
> -------------------------------------------------------------
>
> set textToLog to "This text will be logged to Console.app"
> its logText(textToLog)
>
> -------------------------------------------------------------
> --» HANDLERS
> -------------------------------------------------------------
> on logText(theText)
>     current application's NSLog("%@", theText)
> end logText
> -------------------------------------------------------------
>
> --
> Take Care,
> Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Why won't this quit? (From: Gil Dawson <email@hidden>)
 >Re: Why won't this quit? (From: Steve Mills <email@hidden>)
 >Where do the errors go? (From: Gil Dawson <email@hidden>)
 >Re: Where do the errors go? (From: Axel Luttgens <email@hidden>)
 >Re: Where do the errors go? (From: Gil Dawson <email@hidden>)
 >Re: Where do the errors go? (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Where do the errors go?
  • Next by Date: Apple Mail column widths change every day
  • Previous by thread: Re: Where do the errors go?
  • Next by thread: Re: Where do the errors go?
  • Index(es):
    • Date
    • Thread