Class: UtilLinuxLogger
- Inherits:
-
Object
- Object
- UtilLinuxLogger
- Defined in:
- lib/abrt/util_linux_logger.rb
Overview
UtilLinuxLogger is small utility class intended to be drop in replacement for Syslog. It uses ‘logger` command from util-linux project to provide system logging facilities.
It implements just minimal interface required by ABRT project.
Class Method Summary collapse
-
.open(ident) ⇒ Object
:yields: syslog.
Instance Method Summary collapse
- #err(format_string, *arguments) ⇒ Object
-
#initialize(ident) ⇒ UtilLinuxLogger
constructor
A new instance of UtilLinuxLogger.
- #notice(format_string, *arguments) ⇒ Object
Constructor Details
#initialize(ident) ⇒ UtilLinuxLogger
Returns a new instance of UtilLinuxLogger.
16 17 18 |
# File 'lib/abrt/util_linux_logger.rb', line 16 def initialize(ident) @ident = ident end |
Class Method Details
.open(ident) ⇒ Object
:yields: syslog
Open the UtilLinuxLoggersyslog facility.
‘ident` is a String which identifies the calling program.
12 13 14 |
# File 'lib/abrt/util_linux_logger.rb', line 12 def self.open(ident) self.new(ident) end |
Instance Method Details
#err(format_string, *arguments) ⇒ Object
24 25 26 |
# File 'lib/abrt/util_linux_logger.rb', line 24 def err(format_string, *arguments) log 'user.err', format_string, *arguments end |
#notice(format_string, *arguments) ⇒ Object
20 21 22 |
# File 'lib/abrt/util_linux_logger.rb', line 20 def notice(format_string, *arguments) log 'user.notice', format_string, *arguments end |