Sha256: b03695fb54d46e4d80a99d6f3599e002e37c6f99417e89dad3180b228673ba47

Contents?: true

Size: 546 Bytes

Versions: 8

Compression:

Stored size: 546 Bytes

Contents


# 
# basic use case
#

class Cls

  # to get the with_tag()
  include Tlogger
  
  def initialize
    @log = Tlogger.new(STDOUT)
    @log.tag = :cls
  end

  def bark
    @log.debug "wuf wof"
  end

  def say
    with_tag(:say) do
      @log.debug "inside say"
      puts "Say hello world!"
      @log.warn "after hello!"
    end  

    @log.error "Error here..."
  end
end

#if $0 == __FILE__

#Tlogger::TloggerConf.auto_tag_on
#Tlogger::TloggerConf.disable_all_tags
#Tlogger::TloggerConf.disable_tag([:cls])

c = Cls.new
c.bark
c.say

#end


Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tlogger-0.8.0 samples/basic.rb
tlogger-0.7.0 samples/basic.rb
tlogger-0.6.0 samples/basic.rb
tlogger-0.5.0 samples/basic.rb
tlogger-0.4 samples/basic.rb
tlogger-0.3 samples/basic.rb
tlogger-0.2 samples/basic.rb
tlogger-0.1 samples/basic.rb