Commit f16ccfd4 authored by Jérome Perrin's avatar Jérome Perrin Committed by Kirill Smelkov

zodbdump: use logging.warning instead of deprecated logging.warn

----

kirr: use loggging as log and keep emitting warnings on one line.
parent d6bde57c
...@@ -62,7 +62,7 @@ from ZODB.interfaces import IStorageTransactionInformation ...@@ -62,7 +62,7 @@ from ZODB.interfaces import IStorageTransactionInformation
from zope.interface import implementer from zope.interface import implementer
import sys import sys
import logging import logging as log
import re import re
from golang.gcompat import qq from golang.gcompat import qq
from golang import func, defer, strconv from golang import func, defer, strconv
...@@ -78,9 +78,9 @@ def txn_raw_extension(stor, txn): ...@@ -78,9 +78,9 @@ def txn_raw_extension(stor, txn):
# in a rational way # in a rational way
stor_name = "(%s, %s)" % (type(stor).__name__, stor.getName()) stor_name = "(%s, %s)" % (type(stor).__name__, stor.getName())
if stor_name not in _already_warned_notxnraw: if stor_name not in _already_warned_notxnraw:
logging.warn("%s: storage does not provide IStorageTransactionInformationRaw ...", stor_name) log.warning("%s: storage does not provide IStorageTransactionInformationRaw ...", stor_name)
logging.warn("... will do best-effort to dump pickles in stable order but this cannot be done 100% correctly") log.warning("... will do best-effort to dump pickles in stable order but this cannot be done 100% correctly")
logging.warn("... please upgrade your ZODB & storage: see https://github.com/zopefoundation/ZODB/pull/183 for details.") log.warning("... please upgrade your ZODB & storage: see https://github.com/zopefoundation/ZODB/pull/183 for details.")
_already_warned_notxnraw.add(stor_name) _already_warned_notxnraw.add(stor_name)
return serializeext(txn.extension) return serializeext(txn.extension)
......
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