improve log messages: add info

This commit is contained in:
Felipe Lema 2021-08-16 18:49:40 -04:00
parent b27b1a6d59
commit 7c1d53b186

View File

@ -59,7 +59,7 @@ constexpr Position documentEnd{
std::numeric_limits<decltype(Position::character)>::max()}; std::numeric_limits<decltype(Position::character)>::max()};
inline std::ostream &operator<<(std::ostream &s, const Position pos) { inline std::ostream &operator<<(std::ostream &s, const Position pos) {
s << "{line: " << pos.line << ", end: " << pos.character; s << "{line: " << pos.line << ", end: " << pos.character << "}";
return s; return s;
} }
inline std::ostream &operator<<(std::ostream &s, const lsRange &range) { inline std::ostream &operator<<(std::ostream &s, const lsRange &range) {
@ -69,12 +69,12 @@ inline std::ostream &operator<<(std::ostream &s, const lsRange &range) {
void MessageHandler::textDocument_semanticTokensRange( void MessageHandler::textDocument_semanticTokensRange(
SemanticTokensRangeParams &param, ReplyOnce &reply) { SemanticTokensRangeParams &param, ReplyOnce &reply) {
const std::string path = param.textDocument.uri.getPath();
if (param.range.start == documentBegin && param.range.end == documentEnd) if (param.range.start == documentBegin && param.range.end == documentEnd)
LOG_S(INFO) << "SemanticToken for all document"; LOG_S(INFO) << "SemanticToken for all document of " << path;
else else
LOG_S(INFO) << "SemanticToken for range " << param.range.start; LOG_S(INFO) << "SemanticToken for range " << param.range.start << " of " << path;
std::string path = param.textDocument.uri.getPath();
WorkingFile *wfile = wfiles->getFile(path); WorkingFile *wfile = wfiles->getFile(path);
if (!wfile) { if (!wfile) {
reply.notOpened(path); reply.notOpened(path);