Print "TEXT" to Event Log

Hey all,
I’ve been using the

print "text"

on my scripts to print to the event log so I can troubleshoot scripts mainly in Excel. However, that code doesn’t seem to work universally on all applications.

Is there a print code to print to the event log pane for all apps?


A bunch of things have kept folks from answering this SD.

  1. The Script Editor and Script Debugger 4 both have logs, reached by the word: log myVar or log “someText”, but this doesn’t appear to be what you want. So what do you want?

  2. It’s impossible for us to guess what you’re doing. Are you printing out a log file? Could we see a bit more than that one-liner?

  3. Perhaps you’re shooting for Console output - is that it?

  4. How do you define “Event”?

Sorry for the confusion. Yes this is what I’m trying to do. Essentially troubleshooting a script and would like to see at what point in the script by viewing the output of the script in the console the script breaks.


This will write to the System Log:

set T to "SomeText"
set myTag to "Identifier"
do shell script "logger -t " & myTag & space & T

I’m sorry when I was referring to console. I assumed that it was a reference to the “Event Log”. What I’m trying to see is in the applescript editor’s Event Log. So when you execute code it shows ex. “checking value” then later “calculating value X”. Hopefully that helps to clarify my objective.


Try Adams first step then:

log "checking value"

Logs will only appear if you Event Log selected at the bottom of Script Editor.

Thanks that’s what I needed.