Commit a9cedb3f authored by Ozzie Isaacs's avatar Ozzie Isaacs

Add logger to db.py

parent 51f9cd4b
...@@ -50,6 +50,8 @@ try: ...@@ -50,6 +50,8 @@ try:
except ImportError: except ImportError:
use_unidecode = False use_unidecode = False
log = logger.create()
cc_exceptions = ['datetime', 'comments', 'composite', 'series'] cc_exceptions = ['datetime', 'comments', 'composite', 'series']
cc_classes = {} cc_classes = {}
...@@ -627,9 +629,9 @@ class CalibreDB(): ...@@ -627,9 +629,9 @@ class CalibreDB():
len(query.all())) len(query.all()))
entries = query.order_by(*order).offset(off).limit(pagesize).all() entries = query.order_by(*order).offset(off).limit(pagesize).all()
except Exception as e: except Exception as e:
logger.debug(e) log.debug_or_exception(e)
for book in entries: #for book in entries:
book = self.order_authors(book) # book = self.order_authors(book)
return entries, randm, pagination return entries, randm, pagination
# Orders all Authors in the list according to authors sort # Orders all Authors in the list according to authors sort
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment