Skip to content

Instantly share code, notes, and snippets.

@mturilin
Last active May 19, 2020 03:04
Show Gist options
  • Save mturilin/a48f008690537b1d86116bd0c01bec64 to your computer and use it in GitHub Desktop.
Save mturilin/a48f008690537b1d86116bd0c01bec64 to your computer and use it in GitHub Desktop.
AppleScript
to logit(log_string, log_file)
do shell script ¬
"echo `date '+%Y-%m-%d %T: '`\"" & log_string & ¬
"\" >> $HOME/Library/Logs/" & log_file & ".log"
end logit
property loggit : load script POSIX file "/Users/mturilin/Library/Mobile Documents/com~apple~ScriptEditor2/Documents/logit.scpt"
tell logit
logit("dddd")
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment