Project

dohlog

0.0
No commit activity in last 3 years
No release in over 3 years
Logging framework built to be fast and flexible.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0.1.48, ~> 0.1

Runtime

>= 0.2.29, ~> 0.2
 Project Readme

DohLog

Build Status Code Climate

DohLog is a library designed to help simplify logging

A sample exists in the sample directory.

You could also do something like this in a more complicated setup

logfile_name = Util.logfile_name
file_acceptor = DohLog::StreamAcceptor.new(true, open_logfile(logfile_name))
email_acceptor = DohLog::EmailAcceptor.new(:from => Doh.config[:alerts_email], :to => [Doh.config[:alerts_email]], :server => Doh.config[:alerts_smtp_server]) { {:remote_ip => Util.source_ip, :logfile_name => logfile_name, :server => Socket.gethostname} }
filtered_acceptor = DohLog::FilterAcceptor.new(email_acceptor) {|event| event.severity >= DohLog::NOTIFY}
multi_acceptor = DohLog::MultiAcceptor.new(filtered_acceptor, file_acceptor)
DohLog.setup(multi_acceptor)