9 #ifndef MLIR_TOOLS_LSPSERVERSUPPORT_LOGGING_H
10 #define MLIR_TOOLS_LSPSERVERSUPPORT_LOGGING_H
13 #include "llvm/Support/Debug.h"
14 #include "llvm/Support/FormatVariadic.h"
33 template <
typename... Ts>
34 static void debug(
const char *fmt, Ts &&...vals) {
35 log(
Level::Debug, fmt, llvm::formatv(fmt, std::forward<Ts>(vals)...));
37 template <
typename... Ts>
38 static void info(
const char *fmt, Ts &&...vals) {
39 log(
Level::Info, fmt, llvm::formatv(fmt, std::forward<Ts>(vals)...));
41 template <
typename... Ts>
42 static void error(
const char *fmt, Ts &&...vals) {
43 log(
Level::Error, fmt, llvm::formatv(fmt, std::forward<Ts>(vals)...));
53 static void log(
Level logLevel,
const char *fmt,
54 const llvm::formatv_object_base &message);
This class represents the main interface for logging, and allows for filtering logging based on diffe...
Level
The level of significance for a log message.
static void debug(const char *fmt, Ts &&...vals)
Initiate a log message at various severity levels.
static void setLogLevel(Level logLevel)
Set the severity level of the logger.
static void info(const char *fmt, Ts &&...vals)
static void error(const char *fmt, Ts &&...vals)
Include the generated interface declarations.