Skip to content

fizx/sandbox-loggable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple logging mix-in for Ruby.

Features:

1. Global logger, overrideable at the class level.  
2. Logging methods mixed into your classes.
3. Set global logger level with ENV["LOG_LEVEL"]

		>> require "loggable"
		=> true
		>> class Foo
		>> include Loggable
		>> end
		=> Foo
		>> Foo.logger
		=> #<Logger:0x5ce874 @form... >
		>> f = Foo.new
		=> #<Foo:0x5c5788>
		>> f.info "info goes here"
		I, [2008-09-26T16:41:20.780745 #14792]  INFO -- : info goes here
		=> true
		>> Loggable.default
		=> #<Logger:0x5ce874 @form... >

About

making ruby's logger easier to mix into classes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages