dwbutler / logstash-logger

Ruby logger that writes logstash events
MIT License
456 stars 119 forks source link

Fix alias in multi_logger #161

Open motoroller95 opened 4 years ago

motoroller95 commented 4 years ago

When I use MultiLogger#log I expect that all loggers will receive my message. Actually Logger#log is alias to Logger#add and because ruby alias is not apply to child classes, when I write MultiLogger.new(...).log loggers will no receive message, but Logger#log will

@dwbutler Hi! pls review this

codecov-commenter commented 4 years ago

Codecov Report

Merging #161 into master will decrease coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #161      +/-   ##
==========================================
- Coverage   92.68%   92.64%   -0.04%     
==========================================
  Files          64       64              
  Lines        1668     1673       +5     
==========================================
+ Hits         1546     1550       +4     
- Misses        122      123       +1     
Impacted Files Coverage Δ
lib/logstash-logger/multi_logger.rb 75.34% <100.00%> (+3.12%) :arrow_up:
spec/multi_logger_spec.rb 100.00% <100.00%> (ø)
lib/logstash-logger/device/kinesis.rb 88.88% <0.00%> (-5.56%) :arrow_down:
lib/logstash-logger/device/firehose.rb 88.88% <0.00%> (-5.56%) :arrow_down:
lib/logstash-logger/device/tcp.rb 94.11% <0.00%> (-1.97%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b8f5403...2065ef4. Read the comment docs.