Web based log viewer for the Central Logger
Ruby CoffeeScript JavaScript
Latest commit f61be56 Apr 19, 2012 @astupka astupka Merge pull request #8 from romanbsd/master
Updated the README to reflect the current reqs (hat tip @romanbsd)
Permalink
Failed to load latest commit information.
app Upgrade to Rails 3.2.3 Apr 18, 2012
config precompile handlebars.js in production Apr 18, 2012
db Initial project creation Nov 3, 2010
doc Initial project creation Nov 3, 2010
lib/tasks Initial project creation Nov 3, 2010
public Upgrade to Rails 3.2.3 Apr 18, 2012
script Initial project creation Nov 3, 2010
test Initial project creation Nov 3, 2010
vendor
.gitignore [Fixes #7417527] Remove central_logger dependency. Jan 26, 2011
.rvmrc
Gemfile Upgrade to Rails 3.2.3 Apr 18, 2012
Gemfile.lock
README.md Update README.md Apr 19, 2012
Rakefile Initial project creation Nov 3, 2010
config.ru Initial project creation Nov 3, 2010

README.md

Synopsis

The central log viewer provides a straightforward interface for viewing log data from the central logger.

  1. find() queries using the mongo driver API
  2. grep functionality using find({"key" => /regexp/}) queries
  3. tail -f behavior
  4. A configurable listing

Installation

  1. git clone git://github.com/customink/central_log_viewer.git
  2. cd central_log_viewer
  3. cp config/database.yml.sample config/database.yml
  4. Configure database.yml to point to your mongo db log. See the central_logger README for configuration options and defaults.
  5. bundle install

Usage

  1. The following columns can be specified in the "Listing Fields" text area, separated by comma: action application_name controller ip messages params. path request_time runtime url

  2. Other parameters in a logged request can be specified using the "params.<key>" format.

  3. Checking Tail -f will execute the query every second, appending a {"_id" => {"$gt" => ObjectId("last_object_id")}} clause to the query

Code Overview

This is a Rails 3 application that uses the central_logger gem to configure the mongo driver. A single trivial controller eval()'s the find query and returns JSON to the client for formatting by Handlebars templates. BistroCar is used to dynamically generate JS from several CoffeeScript classes in app/scripts.

Dependencies

  • Ruby 1.9.2 (rvm recommended)
  • Git 1.6+
  • Bundler 1.0+ for dependency management
  • haml/sass

Deployment

Author

Alex Stupka

Copyright (c) 2011 CustomInk, released under the MIT license