# HG changeset patch # User Ludovic Chabant # Date 1408686725 25200 # Node ID f14889d6b067dc053ffbae068ec5c0c0c222b2ce # Parent 9e058e2211088b690a0fde9d6d2e9867ab87ec28 Proper debug logging. diff -r 9e058e221108 -r f14889d6b067 piecrust/commands/builtin/baking.py --- a/piecrust/commands/builtin/baking.py Thu Aug 21 22:51:52 2014 -0700 +++ b/piecrust/commands/builtin/baking.py Thu Aug 21 22:52:05 2014 -0700 @@ -45,7 +45,10 @@ baker.bake() return 0 except Exception as ex: - logger.error(str(ex)) + if ctx.app.debug: + logger.exception(ex) + else: + logger.error(str(ex)) return 1