Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NewbieQ : Debugging



George,

When I want to do logging/debugging outside of XCode, I use the following handler to write to the console.log file (launch /Applications/Utilities/Console to view it):


on logConsole(processName, consoleMsg)
-- version 1.5- uses standard date-stamp format
set timeStamp to do shell script "date +\"%Y-%m-%d %H:%M:%S\""
set hostName to do shell script "hostname -s "
set shellCommand to "echo " & quoted form of (return & timeStamp & " " & hostName & " " & processName & ": " & consoleMsg) & " >> /dev/console"


	do shell script shellCommand

end logConsole


Just send in the name of what you're testing and any text you want to view. Make sure your message is a string.


Daniel A. Shockley
email@hidden
http://www.danshockley.com


At 9:48 AM +1000 7/26/05, George Bray <email@hidden> wrote:

Hi all, I'm wondering how to debug folder actions, a little better than "display dialog". Can I get Applescript to log to syslog or somewhere tail-able?


Also, interactive debugging in Xcode is very slow. Is this right? Should I be looking at Script Debugger as a better tool for this?

thanks 1e6,

--
George Bray
Division of Communication and Education
University of Canberra, Australia


--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.