Skip to content

Commit 492bcf1

Browse files
author
Dom Hudson
committed
Using a namespaced logger
1 parent 9ee1d78 commit 492bcf1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lmdb_embeddings/writer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ def write(self, path):
5151
encoded_word = word.encode(encoding = 'UTF-8')
5252

5353
if self._word_too_long(encoded_word, environment):
54-
logging.warning('[%s] is too long to use as an LMDB key.' % word)
54+
logging.getLogger(__name__).warning(
55+
'[%s] is too long to use as an LMDB key.' % word
56+
)
5557
continue
5658

5759
transaction.put(encoded_word, self.serializer(vector))

0 commit comments

Comments
 (0)