Skip to main content

A flask based web application for central logging

Project description

What is Logy?

Logy is a central logging system for Python based on Flask. It can receive logging records from other servers through Internet and store them in database, then display it as web pages.


To install Logy:

pip install logy

How to use it?

Before you can write some records to Logy, you need to initialize the database. Type and run


By default, it creates sqlite3 database in current directory. And to run the server, here type


And you should see following line in console

* Running on

And here you can open the browser to see the index page. But there is no record in database by now. To write some records to the database, you need to install logging handler first. To install it, type

pip install ex_loghandlers

With the extended logging handler, here is a simple python module which writes logging records to Logy.

import logging

import ex_loghandlers

rootLogger = logging.getLogger('')

sream_handler = logging.StreamHandler()
# set up the http handler which writes records to Logy server
http_handler = ex_loghandlers.ExHTTPHandler(host='localhost:5000',

logger1 = logging.getLogger('myapp.area1')
logger2 = logging.getLogger('myapp.area2')

logger1.debug('Quick zephyrs blow, vexing daft Jim.')'How quickly daft jumping zebras vex.')
logger2.warning('Jail zesty vixen who grabbed pay from quack.')
logger2.error('The five boxing wizards jump quickly.')

    raise Exception("Boom")
    logger1.fatal("Huston, we've got a problem", exc_info=True)'Everything goes fine, now.')

And here you can open the url and see those logging records. Here is some details of the parameters for the logging server in the url “/sink/TEST/myapp”

  • TEST - it is the API key for logging service

  • myapp - it is what name of application you’re running now

For example, you have a server which is running three different application proxy01, web01 and mail01, then you can write url like this:



Of course, you won’t run logy directly in production environment, you need to write your own configuration. You can see the default configuration in logy/, you don’t have to modify the configuration file directly, instead, you can copy it and modify it.

To run the server with your own configuration, you can set up an environment variable, for example: logy_run

And here you are, the server is running with your own configuration.

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution (13.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page