Comment 1 for bug 802396

Revision history for this message
Gabriele Favalessa (favalex) wrote :

I agree, capturing stdout make lots of stuff messy (another example is using
the pdb debugger).

The current situation was intended as an intermediate step anyway, with the aim
of using rabbitmq for logging eventually.

I think we are very close: after landing
https://github.com/gem/openquake/pull/150 and
https://github.com/gem/openquake/pull/304 all the logging output will be going
through the logging modules of python and java (no more prints to stdout).

Sending the output to rabbitmq will be a matter of configuring the logging
modules to use the proper backend.

For log4j I found this http://github.com/jbrisbin/vcloud/tree/master/amqp-appender/

and for python this http://notes.variogr.am/post/143623387/broadcasting-your-logs-with-rabbitmq-and-python .

BTW pull request https://github.com/gem/openquake/pull/150 is actually just
removing some obsoleted files. These files have been modified in the meantime,
making the automatic merge impossible. The gist of the pull request would be
on the other hand really easy to replicate, with a simple rm. Thus I suggest
landing 304 and then open another pull request to remove the files, without
bothering with 150 anymore.