Add more logging to the office backend initialization code
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
from common.utils import load_backend
|
||||
|
||||
@@ -6,9 +8,16 @@ from .exceptions import OfficeBackendError
|
||||
from .office_converter import OfficeConverter
|
||||
from .settings import GRAPHICS_BACKEND
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
logger.debug('initializing office backend')
|
||||
try:
|
||||
office_converter = OfficeConverter()
|
||||
except OfficeBackendError:
|
||||
except OfficeBackendError as exception:
|
||||
logger.error('error initializing office backend; %s', exception)
|
||||
office_converter = None
|
||||
else:
|
||||
logger.debug('office_backend initialized')
|
||||
|
||||
|
||||
backend = load_backend(GRAPHICS_BACKEND)()
|
||||
|
||||
Reference in New Issue
Block a user