Sha256: 7dc6d6c53494ec197666b12007d6f8433fb36264637fa73ced18481538fe68d0
Contents?: true
Size: 1.24 KB
Versions: 12
Compression:
Stored size: 1.24 KB
Contents
# tagged_logger changelog ## Version 0.2.5 * If somebody is not ready to define any logging rules, but still want to use *#logger()* everywhere: TaggedLogger.init * Runs about 3 times faster by executing code responsible for rule matching on the first *#logger()* call and "precompiling" it. So rather than iterating over **all** rules on every _#logger_ call only subset of rules specific to *#logger()* callee get executed. * Code simplified ## Version 0.3.0 * The DSL for defining rules is changed - instead of output /A/ => ... use one of: debug /A/, :to => ... info /A/, :to => ... warn /A/, :to => ... error /A/, :to => ... fatal /A/, :to => ... and instead of output /A/ do #... end use debug /A/ do #or #info, #warn, #error, #fatal #... end These rules are more specific since they name logging level explictly which makes DSL shorter, also such form has allowed to make some optimization. * The *#format()* could be used inside *rules* block: TaggedLogger.rules do format { |level, tag, msg| "#{level}-#{tag}: #{msg}\n"} info /.*/, :to => Logger.new(STDOUT) end
Version data entries
12 entries across 12 versions & 1 rubygems