Class: Logging::LogEvent
- Inherits:
-
Object
- Object
- Logging::LogEvent
- Defined in:
- lib/hammer_cli/logger.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(logger, level, data, caller_tracing) ⇒ LogEvent
constructor
A new instance of LogEvent.
- #old_initialize ⇒ Object
Constructor Details
#initialize(logger, level, data, caller_tracing) ⇒ LogEvent
Returns a new instance of LogEvent.
7 8 9 10 11 12 13 14 15 |
# File 'lib/hammer_cli/logger.rb', line 7 def initialize( logger, level, data, caller_tracing ) # filter out the passwords if data.kind_of? String self.class.data_filters.each do |filter| data = data.gsub(filter[0], filter[1]) end end old_initialize(logger, level, data, caller_tracing) end |
Class Method Details
.add_data_filter(pattern, replacement) ⇒ Object
17 18 19 |
# File 'lib/hammer_cli/logger.rb', line 17 def self.add_data_filter(pattern, replacement) data_filters << [pattern, replacement] end |
Instance Method Details
#old_initialize ⇒ Object
6 |
# File 'lib/hammer_cli/logger.rb', line 6 alias_method :old_initialize, :initialize |