Using Log.xxxx with formatting for IPAddress

I didn’t find any past topics regarding this… although I had a similar question before. I am outputting most of my debugging through the built in Log functionality now. However, I do not know the best way to output something like an IPAddress using the format functionality. What is the best way to use the IPAddress in this example?:

IPAddress myIP = WiFi.localIP();
Log.warn("Local IP: %s; SSID: %s; RSSI: %i", myIP, WiFi.SSID(), WiFi.RSSI());

I tried a cast on my IP which did not work: (const char*)myIP

Close:

myIP.toString().c_str()

or:

(const char *) myIP.toString()
3 Likes

Perfect. Thanks.