diff options
Diffstat (limited to 'BrowserSource/Proxy/Logging.h')
| -rw-r--r-- | BrowserSource/Proxy/Logging.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/BrowserSource/Proxy/Logging.h b/BrowserSource/Proxy/Logging.h new file mode 100644 index 0000000..767821f --- /dev/null +++ b/BrowserSource/Proxy/Logging.h @@ -0,0 +1,19 @@ +#pragma once + +#pragma once + +#include <fmt/core.h> +#include <iostream> +#include <string> +#include <string_view> + +namespace Logging { + // Usage: Log("{}\n", "Hello, world!"); + template<typename... Args> + void Log(std::string_view format, Args&&... args) { + const std::string raw = fmt::vformat(format, fmt::make_format_args(args...)); + + std::cout << raw; + } +} + |
