Closed Julian-O closed 12 years ago
Logging is supported. I added logging to this example: https://github.com/ponty/PyVirtualDisplay/blob/master/pyvirtualdisplay/examples/screenshot3.py
import logging
logging.basicConfig(level=logging.DEBUG)
from easyprocess import EasyProcess
from pyvirtualdisplay.smartdisplay import SmartDisplay
with SmartDisplay(visible=0, bgcolor='black') as disp:
with EasyProcess('xmessage hello'):
img = disp.waitgrab()
img.show()
Stdout and stderr are logged after closing Xvfb.
Oops. Red-faced embarrassment. You answer confused me, until I found in my project's logging set-up some code to suppress debug log messages from easyprocess (!) I did check there for xvfb and pyvirtualdisplay, but didn't realise I should have been looking for easyprocess. Likewise, when examining the code, I didn't realise easyprocess would do this without prompting.
Many apologies. Thank you for your prompt response and very useful project.
[I'm looking at Xvfb in particular, but I believe the issues apply across the board.]
Xvfb generates (stderr) output as it runs, which is useful for debugging. PyVirtualDisplay discards this output.
It would be desirable to either:
be able to specify a destination file in XvfbDisplay constructor for stderr.
or