Object separated logs
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
test
.gitignore
.rake_tasks~
Rakefile
Readme.rdoc
VERSION
ologger.gemspec

Readme.rdoc

Usage

# Initializer
require 'ologger'
Object.send :include OLogger

# Controller  
around_filter OLogger

# Daemon  
OLogger.enable do
  loop do
    bla bla
  end
end

# Configs  
OLogger.path = Pathname('log/ologs')
OLogger.on_raise = lambda { |e| send_to_email(e) }

# In objects
def start!(character)
  ologger "Starting project", character
end

# For raise exceptions to object log
class A
  # definitions

  # AFTER definition
  include OLogger::Raiser
end