Class: Juno::Logger
Overview
Logger proxy
Defined Under Namespace
Classes: Format
Instance Attribute Summary
Attributes inherited from Proxy
Instance Method Summary collapse
- #clear(options = {}) ⇒ Object
- #close ⇒ Object
- #delete(key, options = {}) ⇒ Object
-
#initialize(adapter, options = {}) ⇒ Logger
constructor
Constructor.
- #key?(key, options = {}) ⇒ Boolean
- #load(key, options = {}) ⇒ Object
- #store(key, value, options = {}) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(adapter, options = {}) ⇒ Logger
Constructor
Options:
-
:logger - Callable logger object (default Juno::Logger::Format)
-
:logprefix - Prefix string (default ‘Juno ’)
-
:logout - Output (default STDOUT)
45 46 47 48 |
# File 'lib/juno/logger.rb', line 45 def initialize(adapter, = {}) super @logger = [:logger] || Format.new() end |
Instance Method Details
#clear(options = {}) ⇒ Object
66 67 68 69 |
# File 'lib/juno/logger.rb', line 66 def clear( = {}) log(:clear, ) { super; nil } self end |
#close ⇒ Object
71 72 73 |
# File 'lib/juno/logger.rb', line 71 def close log(:close) { super } end |
#delete(key, options = {}) ⇒ Object
62 63 64 |
# File 'lib/juno/logger.rb', line 62 def delete(key, = {}) log(:delete, key, ) { super } end |
#key?(key, options = {}) ⇒ Boolean
50 51 52 |
# File 'lib/juno/logger.rb', line 50 def key?(key, = {}) log(:key?, key, ) { super } end |
#load(key, options = {}) ⇒ Object
54 55 56 |
# File 'lib/juno/logger.rb', line 54 def load(key, = {}) log(:load, key, ) { super } end |
#store(key, value, options = {}) ⇒ Object
58 59 60 |
# File 'lib/juno/logger.rb', line 58 def store(key, value, = {}) log(:store, key, value, ) { super } end |