Skip to content

Documentation

samantharitter edited this page Jul 17, 2012 · 34 revisions

Welcome to Logl! We're glad you made it here. Here's what you need to do to get Logl up and running:

Installation

  1. Install pip
    Pip is a tool for installing Python packages. If you don't already have pip, you can install it here:
    http://www.pip-installer.org/en/latest/installing.html#

  2. Install PyMongo
    PyMongo, MongoDB's language driver for Python, is a prerequisite for running Logl. You can download and install PymMngo using pip, as described here:
    http://api.mongodb.org/python/current/installation.html

  3. Install MongoDB (which you should all do anyway because it is awesome)
    Help all of us at 10gen out by downloading MongoDB 2.1.2, our latest development release, and helping us test for 2.2!
    http://www.mongodb.org/downloads

  4. Install a non-text-based browser
    We recommend Google Chrome or Firefox.

  5. Install Logl
    COMING SOON

Running Logl

In order to run logl, you must also have a mongod running in the background:

$ ./mongod

Logl is runnable from the command line. Once you have a mongod running, navigate to the top-level logl directory and run the following:

$ python logl/logl.py logfile1 logfile2...

Feed Logl your log files as command line arguments. If you don't have any log files to try with Logl, we've provided some samples so you don't have to miss out on the fun:

$ python logl/logl.py test/1.log test/2.log test/3.log test/4.log test/5.log

Once Logl has launched a web page, it will spawn a python server that will run until you shut it down with Ctrl+C. Be sure to kill this server once you are finished with the visualizer. Happy Logling!

Customize Logl

We've tried to build Logl with you in mind, but every person wants something a little different from their log visualizer. So, we built Logl to make it customizable! If you're familiar with Python and JavaScript and there's something specific you'd like to track, you can add in your own filters to catch special kinds of log messages.

Once a filter finds a log line that fits its requirements, it stores that log as a document in the mongod. The structure of these documents is outlined in each filter, and is slightly different for each type of message. If you're writing your own filter, its documents will have to contain the fields that are outlined in template.py. Feel free to add additional fields, if you'd like.

  1. Write a python filter
    The first round of processing that Logl handles involves a series of filters that parse through the log files. This filters can be found in logl/logl/filters. Let's take rs_status.py as an example.

Bug reports and feature requests

We'd love to hear your input.

Clone this wiki locally