Module: Xlog
- Defined in:
- lib/xlog.rb,
lib/xlog/version.rb,
lib/xlog/xlogger.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.1.0'
Class Attribute Summary collapse
-
.app_name ⇒ Object
Returns the value of attribute app_name.
-
.app_root ⇒ Object
Returns the value of attribute app_root.
-
.base_logger ⇒ Object
Returns the value of attribute base_logger.
-
.config ⇒ Object
Returns the value of attribute config.
-
.xlogger ⇒ Object
Returns the value of attribute xlogger.
Class Method Summary collapse
- .and_raise_error(e, message: nil, data: nil) ⇒ Object
- .configure {|config| ... } ⇒ Object
- .error(e, message: nil, data: nil) ⇒ Object
- .info(message, data: nil) ⇒ Object
- .tag_logger(*tags) ⇒ Object
- .warn(message, data: nil) ⇒ Object
Class Attribute Details
.app_name ⇒ Object
Returns the value of attribute app_name.
9 10 11 |
# File 'lib/xlog.rb', line 9 def app_name @app_name end |
.app_root ⇒ Object
Returns the value of attribute app_root.
9 10 11 |
# File 'lib/xlog.rb', line 9 def app_root @app_root end |
.base_logger ⇒ Object
Returns the value of attribute base_logger.
9 10 11 |
# File 'lib/xlog.rb', line 9 def base_logger @base_logger end |
.config ⇒ Object
Returns the value of attribute config.
9 10 11 |
# File 'lib/xlog.rb', line 9 def config @config end |
.xlogger ⇒ Object
Returns the value of attribute xlogger.
9 10 11 |
# File 'lib/xlog.rb', line 9 def xlogger @xlogger end |
Class Method Details
.and_raise_error(e, message: nil, data: nil) ⇒ Object
27 28 29 |
# File 'lib/xlog.rb', line 27 def and_raise_error(e, message: nil, data: nil) config.xlogger.and_raise_error(e, , data) end |
.configure {|config| ... } ⇒ Object
32 33 34 35 |
# File 'lib/xlog.rb', line 32 def self.configure self.config ||= Config.new yield(config) end |
.error(e, message: nil, data: nil) ⇒ Object
23 24 25 |
# File 'lib/xlog.rb', line 23 def error(e, message: nil, data: nil) config.xlogger.error(e, , data) end |
.info(message, data: nil) ⇒ Object
15 16 17 |
# File 'lib/xlog.rb', line 15 def info(, data: nil) config.xlogger.info(, data) end |
.tag_logger(*tags) ⇒ Object
11 12 13 |
# File 'lib/xlog.rb', line 11 def tag_logger(*) config.xlogger.tag_logger() end |
.warn(message, data: nil) ⇒ Object
19 20 21 |
# File 'lib/xlog.rb', line 19 def warn(, data: nil) config.xlogger.warn(, data) end |