Class: Alephant::Logger::JSON
- Inherits:
-
Object
- Object
- Alephant::Logger::JSON
- Defined in:
- lib/alephant/logger/json.rb,
lib/alephant/logger/json/version.rb
Constant Summary collapse
- VERSION =
"0.3.0"
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(log_path, options = {}) ⇒ JSON
constructor
A new instance of JSON.
Constructor Details
#initialize(log_path, options = {}) ⇒ JSON
Returns a new instance of JSON.
6 7 8 9 10 |
# File 'lib/alephant/logger/json.rb', line 6 def initialize(log_path, = {}) @log_file = File.open(log_path, "a+") @log_file.sync = true @nesting = .fetch(:nesting, false) end |
Class Method Details
.session(fn) ⇒ Object
26 27 28 |
# File 'lib/alephant/logger/json.rb', line 26 def self.session(fn) @@session = fn end |
.session? ⇒ Boolean
30 31 32 |
# File 'lib/alephant/logger/json.rb', line 30 def self.session? defined?(@@session) end |