Sha256: 5308dd21977111cdc09a3b88ae3f2745ba4bea6fd999a8ec095df80493efa7e5
Contents?: true
Size: 721 Bytes
Versions: 12
Compression:
Stored size: 721 Bytes
Contents
# Class For Log to /var/log/system.log # @author modeverv@gmail.com # @example # MyLogger.ln("message") # MyLogger.lw("message") class MyLogger Version = "0.0.1" # log notice # @param [String] message message for log def self.ln(message) self.before Syslog.log(Syslog::LOG_NOTICE, "%s", message) self.after end # log warning # @param [String] message message for log def self.lw(message) self.before Syslog.log(Syslog::LOG_WARNING, "%s", message) self.after end private # open syslog def self.before require 'syslog' include Syslog::Constants Syslog.open("ruby_syslog.rb") end # close syslog def self.after Syslog.close(); end end
Version data entries
12 entries across 12 versions & 1 rubygems