Skip to content

Commit

Permalink
MDX: readmdict.py: use __name__ as logger name, and add 2 debug logs, #…
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Aug 19, 2022
1 parent 78fa747 commit 0535bcf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyglossary/plugin_lib/readmdict.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# GNU General Public License for more details.

import logging
log = logging.getLogger('root')
log = logging.getLogger(__name__)

from struct import pack, unpack
from io import BytesIO
Expand Down Expand Up @@ -480,6 +480,7 @@ def _decode_record_block(self):
record_block = zlib.decompress(record_block_compressed[8:])
except zlib.error:
log.error("zlib decompress error")
log.debug(f"record_block_compressed = {record_block_compressed!r}")
continue

# notice that adler32 return signed value
Expand Down Expand Up @@ -591,6 +592,7 @@ def _decode_record_block(self):
record_block = zlib.decompress(record_block_compressed[8:])
except zlib.error:
log.error("zlib decompress error")
log.debug(f"record_block_compressed = {record_block_compressed!r}")
continue

# notice that adler32 return signed value
Expand Down

0 comments on commit 0535bcf

Please sign in to comment.