Class: Neovim::Logging::Json
- Defined in:
 - lib/neovim/logging.rb
 
Constant Summary collapse
- NAME =
 "json"
Constants inherited from Logger
Instance Method Summary collapse
- 
  
    
      #initialize(file)  ⇒ Json 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Json.
 - #put(**fields) ⇒ Object
 
Methods inherited from Stream
Methods inherited from Logger
Constructor Details
#initialize(file) ⇒ Json
Returns a new instance of Json.
      186 187 188 189 190  | 
    
      # File 'lib/neovim/logging.rb', line 186 def initialize file super require "json" require "time" end  | 
  
Instance Method Details
#put(**fields) ⇒ Object
      191 192 193 194 195  | 
    
      # File 'lib/neovim/logging.rb', line 191 def put **fields fields[ :time] = fields[ :time].iso8601 rescue nil @file.puts fields.to_json @file.flush end  |