I'm developing a small piece of software, that is able to control (start, stop, restart and so on - with gnu screen) every possible gameserver (which have a command line) and includes a tiny standalone webserver with a complete webinterface (you can access the gnu screen from there, like if you're attached to it) on linux.
Almost everything is working and needs some code cleanup now.
It's written in python, the standalone webserver uses cherrypy as a framework.
The problem is, that the gnu screen output on the webinterface is done via a logfile, which can cause high I/O when enabled (ok, it depends on what is running).
Is there a way to pipe the output directly to the standalone webserver (it has to be fast)? Maybe something with sockets, but i dont know how to handle them yet.
If you create a FIFO with mkfifo mypipe.log
and write your log to it you should be able to open this from python and read in. Python and FIFOs might be helpful. If you want a hard-copy of the log as well you can pipe the output through tee
.