Replace logging with std::format

std::format is a much more modern logging solution, and gives us a lot
more flexibility, and better compile times when doing logging.

Unfortunately, given its level of compile time checks, it needs to be a
method, instead of the stream style logging we had before.  This
requires a pretty substantial change.  Fortunately, this change can be
largely automated, via the script included in this commit under
scripts/replace_logs.py.  This is to aid people in moving their
patchsets over to the new form in the short period where old patches
will be based on the old logging.  The intention is that this script
eventually goes away.

The old style logging (stream based) looked like.

BMCWEB_LOG_DEBUG << "Foo " << foo;

The new equivalent of the above would be:
BMCWEB_LOG_DEBUG("Foo {}", foo);

In the course of doing this, this also cleans up several ignored linter
errors, including macro usage, and array to pointer deconstruction.

Note, This patchset does remove the timestamp from the log message.  In
practice, this was duplicated between journald and bmcweb, and there's
no need for both to exist.

One design decision of note is the addition of logPtr.  Because the
compiler can't disambiguate between const char* and const MyThing*, it's
necessary to add an explicit cast to void*.  This is identical to how
fmt handled it.

Tested:  compiled with logging meson_option enabled, and launched bmcweb

Saw the usual logging, similar to what was present before:
```
[Error include/webassets.hpp:60] Unable to find or open /usr/share/www/ static file hosting disabled
[Debug include/persistent_data.hpp:133] Restored Session Timeout: 1800
[Debug redfish-core/include/event_service_manager.hpp:671] Old eventService config not exist
[Info src/webserver_main.cpp:59] Starting webserver on port 18080
[Error redfish-core/include/event_service_manager.hpp:1301] inotify_add_watch failed for redfish log file.
[Info src/webserver_main.cpp:137] Start Hostname Monitor Service...
```
Signed-off-by: Ed Tanous <ed@tanous.net>

Change-Id: I86a46aa2454be7fe80df608cb7e5573ca4029ec8
diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp
index 62bd324..5de3039 100644
--- a/include/nbd_proxy.hpp
+++ b/include/nbd_proxy.hpp
@@ -57,13 +57,13 @@
 
     ~NbdProxyServer()
     {
-        BMCWEB_LOG_DEBUG << "NbdProxyServer destructor";
+        BMCWEB_LOG_DEBUG("NbdProxyServer destructor");
 
-        BMCWEB_LOG_DEBUG << "peerSocket->close()";
+        BMCWEB_LOG_DEBUG("peerSocket->close()");
         boost::system::error_code ec;
         peerSocket.close(ec);
 
-        BMCWEB_LOG_DEBUG << "std::remove(" << socketId << ")";
+        BMCWEB_LOG_DEBUG("std::remove({})", socketId);
         std::remove(socketId.c_str());
 
         crow::connections::systemBus->async_method_call(
@@ -83,12 +83,12 @@
                                      stream_protocol::socket socket) {
             if (ec)
             {
-                BMCWEB_LOG_ERROR << "UNIX socket: async_accept error = "
-                                 << ec.message();
+                BMCWEB_LOG_ERROR("UNIX socket: async_accept error = {}",
+                                 ec.message());
                 return;
             }
 
-            BMCWEB_LOG_DEBUG << "Connection opened";
+            BMCWEB_LOG_DEBUG("Connection opened");
             std::shared_ptr<NbdProxyServer> self = weak.lock();
             if (self == nullptr)
             {
@@ -110,8 +110,8 @@
             }
             if (ec)
             {
-                BMCWEB_LOG_ERROR << "DBus error: cannot call mount method = "
-                                 << ec.message();
+                BMCWEB_LOG_ERROR("DBus error: cannot call mount method = {}",
+                                 ec.message());
 
                 self->connection.close("Failed to mount media");
                 return;
@@ -142,8 +142,8 @@
                                      size_t bytesRead) {
             if (ec)
             {
-                BMCWEB_LOG_ERROR << "UNIX socket: async_read_some error = "
-                                 << ec.message();
+                BMCWEB_LOG_ERROR("UNIX socket: async_read_some error = {}",
+                                 ec.message());
                 return;
             }
             std::shared_ptr<NbdProxyServer> self = weak.lock();
@@ -172,13 +172,13 @@
     {
         if (uxWriteInProgress)
         {
-            BMCWEB_LOG_ERROR << "Write in progress";
+            BMCWEB_LOG_ERROR("Write in progress");
             return;
         }
 
         if (ws2uxBuf.size() == 0)
         {
-            BMCWEB_LOG_ERROR << "No data to write to UNIX socket";
+            BMCWEB_LOG_ERROR("No data to write to UNIX socket");
             return;
         }
 
@@ -199,8 +199,7 @@
 
             if (ec)
             {
-                BMCWEB_LOG_ERROR << "UNIX: async_write error = "
-                                 << ec.message();
+                BMCWEB_LOG_ERROR("UNIX: async_write error = {}", ec.message());
                 self->connection.close("Internal error");
                 return;
             }
@@ -253,7 +252,7 @@
 
     if (ec)
     {
-        BMCWEB_LOG_ERROR << "DBus error: " << ec.message();
+        BMCWEB_LOG_ERROR("DBus error: {}", ec.message());
         conn.close("Failed to create mount point");
         return;
     }
@@ -275,7 +274,7 @@
 
                     if (endpointValue == nullptr)
                     {
-                        BMCWEB_LOG_ERROR << "EndpointId property value is null";
+                        BMCWEB_LOG_ERROR("EndpointId property value is null");
                     }
                 }
                 if (name == "Socket")
@@ -283,7 +282,7 @@
                     socketValue = std::get_if<std::string>(&value);
                     if (socketValue == nullptr)
                     {
-                        BMCWEB_LOG_ERROR << "Socket property value is null";
+                        BMCWEB_LOG_ERROR("Socket property value is null");
                     }
                 }
             }
@@ -299,7 +298,7 @@
 
     if (objects.empty() || endpointObjectPath == nullptr)
     {
-        BMCWEB_LOG_ERROR << "Cannot find requested EndpointId";
+        BMCWEB_LOG_ERROR("Cannot find requested EndpointId");
         conn.close("Failed to match EndpointId");
         return;
     }
@@ -308,7 +307,7 @@
     {
         if (session.second->getEndpointId() == conn.req.target())
         {
-            BMCWEB_LOG_ERROR << "Cannot open new connection - socket is in use";
+            BMCWEB_LOG_ERROR("Cannot open new connection - socket is in use");
             conn.close("Slot is in use");
             return;
         }
@@ -325,7 +324,7 @@
 };
 inline void onOpen(crow::websocket::Connection& conn)
 {
-    BMCWEB_LOG_DEBUG << "nbd-proxy.onopen(" << &conn << ")";
+    BMCWEB_LOG_DEBUG("nbd-proxy.onopen({})", logPtr(&conn));
 
     sdbusplus::message::object_path path("/xyz/openbmc_project/VirtualMedia");
     dbus::utility::getManagedObjects(
@@ -344,11 +343,11 @@
 inline void onClose(crow::websocket::Connection& conn,
                     const std::string& reason)
 {
-    BMCWEB_LOG_DEBUG << "nbd-proxy.onclose(reason = '" << reason << "')";
+    BMCWEB_LOG_DEBUG("nbd-proxy.onclose(reason = '{}')", reason);
     auto session = sessions.find(&conn);
     if (session == sessions.end())
     {
-        BMCWEB_LOG_DEBUG << "No session to close";
+        BMCWEB_LOG_DEBUG("No session to close");
         return;
     }
     // Remove reference to session in global map
@@ -359,7 +358,7 @@
                       crow::websocket::MessageType /*type*/,
                       std::function<void()>&& whenComplete)
 {
-    BMCWEB_LOG_DEBUG << "nbd-proxy.onMessage(len = " << data.size() << ")";
+    BMCWEB_LOG_DEBUG("nbd-proxy.onMessage(len = {})", data.size());
 
     // Acquire proxy from sessions
     auto session = sessions.find(&conn);