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) {
33 L->log(Level, 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),
void log(Logger::Level, const llvm::formatv_object_base &)
constexpr llvm::StringLiteral 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.