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