Class: BlackStack::LocalLogger
- Inherits:
-
BaseLogger
- Object
- BaseLogger
- BlackStack::LocalLogger
- Defined in:
- lib/locallogger.rb
Instance Method Summary collapse
- #log(s, datetime = nil) ⇒ Object
- #logf(s, datetime = nil) ⇒ Object
- #logs(s, datetime = nil) ⇒ Object
- #release ⇒ Object
-
#reset ⇒ Object
call the parent class to set the attributes call the save method to store the new attributes into the data file.
Instance Method Details
#log(s, datetime = nil) ⇒ Object
12 13 14 15 16 |
# File 'lib/locallogger.rb', line 12 def log(s, datetime=nil) ltext = super(s, datetime) File.open(self.filename, 'a') { |file| file.write(ltext) } ltext end |
#logf(s, datetime = nil) ⇒ Object
26 27 28 29 30 |
# File 'lib/locallogger.rb', line 26 def logf(s, datetime=nil) ltext = super(s, datetime) File.open(self.filename, 'a') { |file| file.write(ltext) } ltext end |
#logs(s, datetime = nil) ⇒ Object
19 20 21 22 23 |
# File 'lib/locallogger.rb', line 19 def logs(s, datetime=nil) ltext = super(s, datetime) File.open(self.filename, 'a') { |file| file.write(ltext) } ltext end |
#release ⇒ Object
33 34 35 |
# File 'lib/locallogger.rb', line 33 def release() BlackStack::LocalLoggerFactory.release(self.filename) end |
#reset ⇒ Object
call the parent class to set the attributes call the save method to store the new attributes into the data file
7 8 9 10 |
# File 'lib/locallogger.rb', line 7 def reset() super BlackStack::LocalLoggerFactory::save(self.filename, self) end |