alexsilva / supervisor

Supervisor process control system for Windows
http://supervisord.org
Other
118 stars 26 forks source link

stdout logging #11

Closed jmajoor closed 4 years ago

jmajoor commented 4 years ago

On Linux you can use /dev/stdout and /dev/stderr as log files for processes defined in the supervisor configuration file.

The supervisord process itself is writing to stdout, but I also want the output of the sub-processes to be on stdout.

Has an alternative for /dev/stdout been implemented?

alexsilva commented 4 years ago

For this case you need to write a log handler that writes to the stdout of the main process (supervisor). This functionality does not currently exist.

alexsilva commented 4 years ago

You can try this plugin https://github.com/coderanger/supervisor-stdout

jmajoor commented 4 years ago

The supervisor-stdout package doesn't work properly with Python3, but some pull requests have fixed that. Using one of the python3 versions of supervisor-stdout I am still gettting the following: can't concat str to bytes in handle_read_event|381

alexsilva commented 4 years ago

I will try to correct this problem.

alexsilva commented 4 years ago

I made the necessary changes that correct the problem can't concat str to bytes in handle_read_event|381 but supervisor-stdout needs to be adjusted for this version of supervisor + windows

You can install and test with the command

python -m pip install git+https://github.com/alexsilva/supervisor.git@windows -U

supervisor_stdout.zip

jmajoor commented 4 years ago

I tested it and it all seems to work. Thanks for the quick fix.