Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A pub/sub modeled, distributed Erlang logging system
Erlang Perl JavaScript
branch: fetch_refactor

This branch is 37 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ebin
include
priv
public
src
support
t
templates
.gitignore
Makefile
README
log_roller

README

== ABOUT ==
Log_roller is based on a publisher/subscriber model. It integrates
seamlessly with existing systems without the need to change code.
Nodes designated as publishers broadcast log messages sent to the
error_logger to nodes designated as subscribers.  The subscriber
writes the log message to a rotating disk log similar to the SASL
error_logger_mf_maxbytes and error_logger_mf_maxfiles functionality.

Publishers and subscribers perform auto-discovery upon booting.
During startup, nodes of either type (publisher or subscriber)
will attempt to connect. Make sure to have matching ~/.erlang.cookie 
files hosted on the servers running log_roller. The nodes will 
not be able to see each other otherwise.

== Installation ==
Either clone the repository github.com/JacobVorreuter/log_roller
or download the tarball from jacobvorreuter.github.com/log_roller
and run "sudo make install"

== Integration ==
To begin logging messages with log_roller, simple start the
log_roller application. This can be done either in the app file of your
application:

{application, my_app, [
    {description, "my_app"},
    {vsn, "0.3"},
    {modules, []},
    {registered, []},
    {mod, {my_app, []}},
    {applications, [kernel, stdlib, log_roller]}
]}.

-or-

you can just call application:start from somewhere in your app:

ok = application:start(log_roller)

Nodes with log_roller enabled will automatically ping visible
log_roller server nodes to establish a connection.

******

To start a subscriber node, you must either use the log_roller_server
boot script or start the log_roller_server application.

erl -name server -boot log_roller_server

-or-

{application, my_app, [
    {description, "my_app"},
    {vsn, "0.3"},
    {modules, []},
    {registered, []},
    {mod, {my_app, []}},
    {applications, [kernel, stdlib, log_roller_server]}
]}.

-or-

ok = application:start(log_roller_server)

== CONFIGURATION ==
There is a config file, "log_roller.config" located in the priv 
directory.  This will be installed to the priv directory in the
log_roller lib directory inside your otp root directory. For
instance: /usr/lib/erlang/lib/log_roller-0.1/priv/log_roller.config.
This contains the path to the log directory as well as max file size
and number of rotating log files.

== LICENSE ==

Copyright (c) 2009 Jacob Vorreuter <jacob.vorreuter@gmail.com>

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

== TODO ==
* make reading faster - add map/reduce algorithm for chunking and
  parsing logs
* filter logs
* read index file instead of asking disk_log where current head is
* add code coverage target
Something went wrong with that request. Please try again.