Skip to content

Instantly share code, notes, and snippets.

@phuesler
Created November 7, 2011 22:07
Show Gist options
  • Save phuesler/1346359 to your computer and use it in GitHub Desktop.
Save phuesler/1346359 to your computer and use it in GitHub Desktop.
require 'syslog'
def log(message, level = :warning)
script_name = $0
syslog_option = Syslog::LOG_PID | Syslog::LOG_CONS
Syslog.open($0, syslog_option) do |s|
s.send(level, message)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment