Skip to content

Commit

Permalink
Using a namespaced logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Hudson committed Sep 23, 2018
1 parent 9ee1d78 commit 492bcf1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lmdb_embeddings/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def write(self, path):
encoded_word = word.encode(encoding = 'UTF-8')

if self._word_too_long(encoded_word, environment):
logging.warning('[%s] is too long to use as an LMDB key.' % word)
logging.getLogger(__name__).warning(
'[%s] is too long to use as an LMDB key.' % word
)
continue

transaction.put(encoded_word, self.serializer(vector))
Expand Down

0 comments on commit 492bcf1

Please sign in to comment.