Project

analogger

0.01
No commit activity in last 3 years
No release in over 3 years
Analogger provides a fast and very stable asynchronous central logging service capable of handling heavy logging loads. It has been in production use for almost a decade.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 11.0

Runtime

~> 1.2.5
 Project Readme

Analogger

Overview

Analogger is a fast asynchronous logging service and client library. It is implemented in Ruby, and currently uses async in the server, a pure Ruby event reactor.

Analogger was originally written over a decade ago, in response to a need to maintain a central logging server to accumulate logs from numerous web applications to a single location. It takes very little time to send a logging message, making it a very low impact logger for performance sensitive applications. It has been continuously used in production since then, albeit in a version not released publicly.

Usage

Analogger is configured through a YAML formatted file:

host: mycompany-logger-1-nyc1.private
port: 6766
default_log: /var/log/analogger_default
daemonize: true
syncinterval: 5
logs:
- service:
  - default
  logfile: /var/log/analogger/default
  cull: true
- service:
  - project-development
  logfile: /var/log/analogger/project-development.log
- service:
  - project-production
  logfile: /var/log/analogger/project-production.log
  cull: true

Configuration Variables

  • port

    The port to listen for connections on. 6766 is the default.

  • host

    The hostname or IP to bind to when listening for connections.

  • default_log: /var/log/analogger_default

    This is the file to send logs to which don't appear to match any named service in the configuration.

  • daemonize

    Whether or not to detach an analogger process as a daemon process. You normally want this to be true.

  • syncinterval

    Analogger will run a thread every X seconds to ensure that any currently buffered log contents are synchronized to disk. Analogger tries to write any buffered logs before it exits if it receives a signal which would cause the process to die. However, in the event that this is not possible, only the logs received since the last sync interval would be at risk.

  • logs

    This is a list of defined logging services. Each consists of a service label, a logging destination (the path to the log file for that service), and optionally a cull attribute which, if true, causes analogger to deduplicate logs, eliminating consecutive repeats of the same message and instead emitting a summary of how many records like the one above the summary were culled.