New submission from Bruce Merry <bme...@gmail.com>:

logging.DatagramHandler uses socket.sendto to send the messages. If the given 
address is a hostname rather than an IP address, it will do a DNS lookup every 
time.

I suspect that fixing issue 14855 will also fix this, since fixing that issue 
requires resolving the hostname to determine whether it is an IPv4 or IPv6 
address to create a suitable socket.

I've run into this on 3.8, but tagging 3.10 since the code still looks the same.

----------
components: Library (Lib)
messages: 416247
nosy: bmerry
priority: normal
severity: normal
status: open
title: DatagramHandler doing DNS lookup on every log message
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue47149>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to