Giter Club home page Giter Club logo

central_log_viewer's Introduction

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. brew install coffee-script # 1.0 is required
  3. cd central_log_viewer
  4. cp config/database.yml.sample config/database.yml
  5. Configure database.yml to point to your mongo db log. See the central_logger README for configuration options and defaults.
  6. 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
  • CoffeeScript 1.0 (Node.js dep)
  • bistro_car
  • haml/sass

Deployment

Author

Alex Stupka

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.