Re: Where do the errors go?
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