public
Description: my random ruby scripts
Homepage:
Clone URL: git://github.com/kastner/ruby-junk.git
Click here to lend your support to: ruby-junk and make a donation at www.pledgie.com !
ruby-junk / log-test.rb
100755 8 lines (6 sloc) 0.199 kb
1
2
3
4
5
6
7
8
require 'syslog'
 
def log(message)
  # $0 is the current script name
  Syslog.open("bob", Syslog::LOG_PID | Syslog::LOG_CONS, facility = Syslog::LOG_LOCAL0) { |s| s.notice message }
end
 
log "HI!!!"