Go to the documentation of this file.
11 #include "llvm/Support/Chrono.h"
12 #include "llvm/Support/FormatVariadic.h"
13 #include "llvm/Support/raw_ostream.h"
31 const llvm::formatv_object_base &
Message) {
36 std::lock_guard<std::mutex> Guard(Mu);
37 llvm::errs() <<
Message <<
"\n";
42 if (
const char *Slash = strrchr(
Filename,
'/'))
44 if (
const char *Backslash = strrchr(
Filename,
'\\'))
50 const llvm::formatv_object_base &
Message) {
53 llvm::sys::TimePoint<> Timestamp = std::chrono::system_clock::now();
55 std::lock_guard<std::mutex> Guard(StreamMutex);
56 Logs << llvm::formatv(
"{0}[{1:%H:%M:%S.%L}] {2}\n",
indicator(
Level),
Interface to allow custom logging in clangd.
static const char Message[]
std::string Filename
Filename as a string.
void log(const llvm::Twine &Message)
Records a single instant event, associated with the current thread.
const char * debugType(const char *Filename)
void log(Level, const llvm::formatv_object_base &Message) override
Write a line to the logging stream.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
static char indicator(Level L)
LoggingSession(clangd::Logger &Instance)
void log(Logger::Level, const llvm::formatv_object_base &)