• 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: How to put logs in console using AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to put logs in console using AppleScript


  • Subject: Re: How to put logs in console using AppleScript
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 19 Oct 2009 12:06:25 -0700

On Oct 18, 2009, at 12:47 AM, Tom Robinson wrote:

On 2009-10-09, at 19:41, Tim Mansour wrote:

2009/10/9 Infosys Deepak <email@hidden>

I am trying to put logs in console using the below command:
tell application "Mail" to log "Test"
I am not seeing this message in the console. Please let me know if the above script is correct ?

Deepak I think you'll find that Mail does not have a "log" command. Script Editor does, so perhaps that's where you got it from. In any case, I usually use something like this:

In 10.6 I've found the straight 'log' command now logs to console when running an AppleScript as a launch agent (and still logs within AppleScript Editor when run that way). Handy.

Technically, it's that osascript(1) now implements the "log" command by printing to stderr. When running as a launch agent, that's bound to Console.app. This is mentioned in the release notes.



--Chris Nebel AppleScript Engineering

_______________________________________________
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: 
 >How to put logs in console using AppleScript (From: Infosys Deepak <email@hidden>)
 >Re: How to put logs in console using AppleScript (From: Tim Mansour <email@hidden>)
 >Re: How to put logs in console using AppleScript (From: Tom Robinson <email@hidden>)

  • Prev by Date: Re: Empty strings in XML-RPC struct replies
  • Next by Date: How to reliably target a helper app that's inside a bundle?
  • Previous by thread: Re: How to put logs in console using AppleScript
  • Next by thread: Re: Snow Leopard and (old) AppleScript applications
  • Index(es):
    • Date
    • Thread