Class: SPSPubLogDRbClient
- Inherits:
-
Object
- Object
- SPSPubLogDRbClient
- Defined in:
- lib/spspublog_drb_client.rb
Defined Under Namespace
Modules: Severity
Constant Summary collapse
- DEBUG =
Severity::DEBUG
- INFO =
Severity::INFO
- WARN =
Severity::WARN
- ERROR =
Severity::ERROR
- FATAL =
Severity::FATAL
- UNKNOWN =
Severity::UNKNOWN
Instance Attribute Summary collapse
-
#level ⇒ Object
Returns the value of attribute level.
Instance Method Summary collapse
- #debug(s) ⇒ Object
- #error(s) ⇒ Object
- #fatal(s) ⇒ Object
- #info(s) ⇒ Object
-
#initialize(host: '127.0.0.1', port: '9090', level: Severity::DEBUG) ⇒ SPSPubLogDRbClient
constructor
A new instance of SPSPubLogDRbClient.
Constructor Details
#initialize(host: '127.0.0.1', port: '9090', level: Severity::DEBUG) ⇒ SPSPubLogDRbClient
Returns a new instance of SPSPubLogDRbClient.
34 35 36 37 38 39 40 41 |
# File 'lib/spspublog_drb_client.rb', line 34 def initialize(host: '127.0.0.1', port: '9090', level: Severity::DEBUG) DRb.start_service @log = DRbObject.new nil, "druby://#{host}:#{port}" @log.level = level end |
Instance Attribute Details
#level ⇒ Object
Returns the value of attribute level.
32 33 34 |
# File 'lib/spspublog_drb_client.rb', line 32 def level @level end |
Instance Method Details
#debug(s) ⇒ Object
43 44 45 |
# File 'lib/spspublog_drb_client.rb', line 43 def debug(s) @log.debug s end |
#error(s) ⇒ Object
47 48 49 |
# File 'lib/spspublog_drb_client.rb', line 47 def error(s) @log.error s end |
#fatal(s) ⇒ Object
51 52 53 |
# File 'lib/spspublog_drb_client.rb', line 51 def fatal(s) @log.fatal s end |
#info(s) ⇒ Object
55 56 57 |
# File 'lib/spspublog_drb_client.rb', line 55 def info(s) @log.info s end |