[Cubicweb] How to debug cubicweb withoutdebug mode?

Christophe de Vienne christophe at unlish.com
Sat Apr 9 15:19:38 CEST 2016



Le 07/04/2016 12:30, Dimitri Papadopoulos Orfanos a écrit :
> Dear all,
> 
> CubiWeb's debug mode (cubicweb-ctl start -D) is not very useful because
> many errors only happen outside debug mode:
> * the docutils bug I've been struggling with,
> * different default behaviour related to log files and other resources,
> * ...
> 
> I need to see as much error message as possible, without using CuicWeb's
> debug mode. How do I get as much error output as possible.? For example
> I need to see the error messages related to the docutils crash.
> 
> Patching CubicWeb would be acceptable while debugging.

The first thing you can do is configure the logging with a
"logging.conf" file next to all-in-one.conf [1].

Another thing would be to run the server with the 'pyramid' command,
which has a '--no-daemon' switch that does not turn on debug mode. This
way, some non-caught exception may be visible in the console. It also
allows you to configure logging to output to the console instead of a
file, which can be more comfortable.

Cheers,

Christophe

[1] See
https://docs.python.org/2.7/library/logging.config.html#configuration-file-format

-- 
Christophe de Vienne
Co-fondateur http://unli.sh



More information about the Cubicweb mailing list