Sha256: a5c3bea8ca91a72204e05f0bc6176d969a347f0f70512881ba09ac1fde2c066d

Contents?: true

Size: 350 Bytes

Versions: 2

Compression:

Stored size: 350 Bytes

Contents

require 'rubygems'
require 'tagged_logger'
require 'logger'

class LogFoo
  def foo
    logger.info("foo")
  end
end

Database = Class.new LogFoo
Network = Class.new LogFoo

TaggedLogger.rules do
  output Network => Logger.new(open("network.log", "w"))
  output Database => Logger.new(open("database.log", "w"))
end

Database.new.foo
Network.new.foo

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tagged_logger-0.2.5 examples/per_class_customization.rb
tagged_logger-0.2.1 examples/per_class_customization.rb