# File ../../auditor/lib/kasp_checker.rb, line 81 def log(level, msg) if (level.to_i < @ret_val) @ret_val = level.to_i end if (@syslog) Syslog.open("ods-kaspcheck", Syslog::LOG_PID | Syslog::LOG_CONS, @syslog) { |slog| slog.log(level, msg) } end # Convert the level into text, rather than a number? e.g. "WARNING" level_string = case level when LOG_ERR then "ERROR" when LOG_WARNING then "WARNING" when LOG_INFO then "INFO" when LOG_CRIT then "CRITICAL" end print "#{level_string}: #{msg}\n" end