diff --git a/tailbone/views/products.py b/tailbone/views/products.py index 9ee7a60c..3369e3e2 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -27,6 +27,7 @@ Product Views from __future__ import unicode_literals, absolute_import import re +import logging import six import sqlalchemy as sa @@ -52,6 +53,9 @@ from tailbone.progress import SessionProgress from tailbone.util import raw_datetime +log = logging.getLogger(__name__) + + # TODO: For a moment I thought this was going to be necessary, but now I think # not. Leaving it around for a bit just in case... @@ -1169,6 +1173,7 @@ def print_labels(request): try: printer.print_labels([(product, quantity, {})]) except Exception as error: + log.warning("error occurred while printing labels", exc_info=True) return {'error': six.text_type(error)} return {}