Module: RUL::Logging
- Defined in:
- lib/rul/rul.rb
Constant Summary collapse
- @@uuid =
UUID.new
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
7 8 9 10 11 |
# File 'lib/rul/rul.rb', line 7 def self.included(base) base.class_eval do alias_method_chain :add, :uuid_info end end |
Instance Method Details
#add_with_uuid_info(severity, message = nil, progname = nil, &block) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/rul/rul.rb', line 13 def add_with_uuid_info severity, =nil, progname=nil, &block uuid = (Thread.current[:uuid] ||= @uuid.generate) unless .include?(uuid) = "#{uuid} - #{}" end add_without_uuid_information severity, , progname, &block end |