Class: Swiftcore::Analogger::Log

Inherits:
Object
  • Object
show all
Defined in:
lib/swiftcore/Analogger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(spec) ⇒ Log

Returns a new instance of Log.



273
274
275
276
277
278
# File 'lib/swiftcore/Analogger.rb', line 273

def initialize(spec)
  @service = spec[-"service"]
  @levels = spec[-"levels"]
  @logfile = spec[-"logfile"]
  @cull = spec[-"cull"]
end

Instance Attribute Details

#cullObject (readonly)

Returns the value of attribute cull.



271
272
273
# File 'lib/swiftcore/Analogger.rb', line 271

def cull
  @cull
end

#levelsObject (readonly)

Returns the value of attribute levels.



271
272
273
# File 'lib/swiftcore/Analogger.rb', line 271

def levels
  @levels
end

#logfileObject (readonly)

Returns the value of attribute logfile.



271
272
273
# File 'lib/swiftcore/Analogger.rb', line 271

def logfile
  @logfile
end

#serviceObject (readonly)

Returns the value of attribute service.



271
272
273
# File 'lib/swiftcore/Analogger.rb', line 271

def service
  @service
end

Instance Method Details

#==(n) ⇒ Object



284
285
286
287
288
289
# File 'lib/swiftcore/Analogger.rb', line 284

def ==(n)
  n.service == @service &&
    n.levels == @levels &&
    n.logfile == @logfile &&
    n.cull == @cull
end

#to_sObject



280
281
282
# File 'lib/swiftcore/Analogger.rb', line 280

def to_s
  "service: #{@service}\nlevels: #{@levels.inspect}\nlogfile: #{@logfile}\ncull: #{@cull}\n"
end