[Mlir-commits] [llvm] [mlir] Introduce a "log level" support for DEBUG_TYPE (PR #150855)
Jacques Pienaar
llvmlistbot at llvm.org
Mon Jul 28 04:16:23 PDT 2025
================
@@ -119,19 +155,22 @@ getShortFileName(const char *path) {
/// "[DebugType] File:Line "
/// Where the File is the file name without the path prefix.
static LLVM_ATTRIBUTE_UNUSED std::string
-computePrefix(const char *DebugType, const char *File, int Line) {
+computePrefix(const char *DebugType, const char *File, int Line, int Level) {
std::string Prefix;
raw_string_ostream OsPrefix(Prefix);
- if (DebugType)
- OsPrefix << "[" << DebugType << "] ";
+ if (DebugType) {
+ if (Level == 0)
+ Level = 1;
+ OsPrefix << "[" << DebugType << ":" << Level << "] ";
----------------
jpienaar wrote:
I'm not sure about level here - it is more complete, but I see it more as enabling logging rather than a grouping mechanism.
https://github.com/llvm/llvm-project/pull/150855
More information about the Mlir-commits
mailing list