log: Prefix log messages with function name if -logsourcelocations is set

This commit is contained in:
practicalswift
2020-08-25 20:22:28 +00:00
parent 29d2aeb4a2
commit b4511e2e2e
8 changed files with 40 additions and 4 deletions

View File

@@ -25,6 +25,14 @@
return str.substr(front, end - front + 1);
}
[[nodiscard]] inline std::string RemovePrefix(const std::string& str, const std::string& prefix)
{
if (str.substr(0, prefix.size()) == prefix) {
return str.substr(prefix.size());
}
return str;
}
/**
* Join a list of items
*