From 8791f0558fc103df43a2d7ab214904ad9a15f147 Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Fri, 26 Oct 2018 22:53:03 -0700 Subject: Stop using deprecated log.warn() I missed this in my previous cleanup back in 9221fcf83528b5c3657e43636cb84c1d18025acd. --- kafka/producer/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kafka/producer/base.py b/kafka/producer/base.py index 956cef6..1da74c8 100644 --- a/kafka/producer/base.py +++ b/kafka/producer/base.py @@ -83,7 +83,7 @@ def _send_upstream(queue, client, codec, batch_time, batch_size, try: client.reinit() except Exception as e: - log.warn('Async producer failed to connect to brokers; backoff for %s(ms) before retrying', retry_options.backoff_ms) + log.warning('Async producer failed to connect to brokers; backoff for %s(ms) before retrying', retry_options.backoff_ms) time.sleep(float(retry_options.backoff_ms) / 1000) else: break @@ -189,12 +189,12 @@ def _send_upstream(queue, client, codec, batch_time, batch_size, # doing backoff before next retry if retry_state['do_backoff'] and retry_options.backoff_ms: - log.warn('Async producer backoff for %s(ms) before retrying', retry_options.backoff_ms) + log.warning('Async producer backoff for %s(ms) before retrying', retry_options.backoff_ms) time.sleep(float(retry_options.backoff_ms) / 1000) # refresh topic metadata before next retry if retry_state['do_refresh']: - log.warn('Async producer forcing metadata refresh metadata before retrying') + log.warning('Async producer forcing metadata refresh metadata before retrying') try: client.load_metadata_for_topics() except Exception: -- cgit v1.2.1