Home > couchlog

couchlog

Couchlog is a project mainly written in Ruby, based on the MIT license.

A Rails plugin that uses CouchDB to store app logs rather than the standard log files.

= CouchLog

CouchLog is a Ruby on Rails plugin that stores all of your app's log data in CouchDB.

== Warning

This plugin is currently under development.

== Requirements

Rails >= 2.3.2

CouchDB >= 0.9.1

== Helpful Links

  • Documentation: http://rdoc.info/projects/rdempsey/CouchLog
  • Repository: http://github.com/rdempsey/CouchLog/tree/master
  • CouchDB: http://couchdb.apache.org/
  • CouchDBX: http://janl.github.com/couchdbx/

== Install & Use

Install CouchDB on a server that your application has access to.

Install the current version of the plugin:

script/plugin install git://github.com/ads/couchlog.git

Install the couchrest gem

Require CouchLog in your config before the initializer:

config/environment.rb

require 'couch_log'

Set the level of logging that you want for your app inside of the initializer:

config.log_level = ENV['RAILS_ENV']=='production' ?
ActiveSupport::BufferedLogger::Severity::INFO : ActiveSupport::BufferedLogger::Severity::DEBUG

Just below config.log_level, Initialize the plugin:

config.logger = CouchLog.new(config.log_path, config.log_level)

Set the location of the database in the config file

config/couchlog.yml

server = YOUR_SERVER_HERE

== Copyright & License

Copyright (c) 2009 {Robert Dempsey}[http://www.adsdevshop.com], released under the MIT license.

Thanks to the code provided by bikethetam on the {UbuntuSolutions}[http://www.ubuntusolutions.org/2009/08/custom-logger-in-rails.html] blog

Previous:CustomCats