Mercurial > piecrust2
comparison piecrust/commands/builtin/baking.py @ 43:f14889d6b067
Proper debug logging.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 21 Aug 2014 22:52:05 -0700 |
parents | 2f717f961996 |
children | efd0d3bacc9e |
comparison
equal
deleted
inserted
replaced
42:9e058e221108 | 43:f14889d6b067 |
---|---|
43 | 43 |
44 try: | 44 try: |
45 baker.bake() | 45 baker.bake() |
46 return 0 | 46 return 0 |
47 except Exception as ex: | 47 except Exception as ex: |
48 logger.error(str(ex)) | 48 if ctx.app.debug: |
49 logger.exception(ex) | |
50 else: | |
51 logger.error(str(ex)) | |
49 return 1 | 52 return 1 |
50 | 53 |
51 | 54 |
52 class ShowRecordCommand(ChefCommand): | 55 class ShowRecordCommand(ChefCommand): |
53 def __init__(self): | 56 def __init__(self): |