Sha256: 88a327a723b36a2ce3f7d54e1cedc2624ad0db8cda0807e5629f3c6b088ef0b5
Contents?: true
Size: 398 Bytes
Versions: 2
Compression:
Stored size: 398 Bytes
Contents
require 'rubygems' require 'tagged_logger' require 'logger' module LogFoo def foo logger.info("#{self.class}#foo") end end Ftp = Class.new { include LogFoo } Http = Class.new { include LogFoo } Sockets = Class.new { include LogFoo } TaggedLogger.rules do rename [Ftp, Http, Sockets] => :Network output :Network => Logger.new(STDOUT) end [Ftp, Http, Sockets].each { |c| c.new.foo }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tagged_logger-0.2.5 | examples/one_tag_per_classes.rb |
tagged_logger-0.2.1 | examples/one_tag_per_classes.rb |