carstencodes / supervisor-console

A simple plug-in for supervisord writing the output of the processes to the main log of supervisor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

supervisor-console

A simple supervisord event listener to relay process output to supervisor's stdout and stderr.

This is useful in situations where the output will be collected and set to external logging framework, such as Heroku, ElasticSearch (ELK), etc..

Installation

Just install via pip or add to your requirements.txt:

pip install supervisor-console

Usage

An example supervisord.conf:

[supervisord]
nodaemon = true

[supervisorconsole]
logformat= ;; format of the logging. Available variables are `processname`, `timestamp` and `line` 

[program:web]
command = ...
stdout_events_enabled = true
stderr_events_enabled = true

[eventlistener:stdout]
command = /usr/bin/env python3 -m supervisor_console
buffer_size = 100
events = PROCESS_LOG
result_handler = supervisor_console.events:event_handler

About

A simple plug-in for supervisord writing the output of the processes to the main log of supervisor.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%