I am using Python logging in this manner:
logger = logging.getLogger("my_logger")
logger.info("Some text.")
I have a bunch of IoT devices all running (making logs). They stream their log data to a database. To differentiate the source, I need to include the source IP address.
Is there a way to get hostname using logging? Is IP Address or hostname tracked/trackable in LogRecords?
In general, what is the best way to add in hostname to a LogRecord?