feature: Add capability to print debug messages with pid and timestamp

Controlled with the knob DebugMessagesBitmask (1 - pid, 2 - timestamp)

Related-To: NEO-12952

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
This commit is contained in:
Slawomir Milczarek
2025-06-21 18:05:09 +00:00
committed by Compute-Runtime-Automation
parent 59cb5098e7
commit 2720f2316c
8 changed files with 70 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 Intel Corporation
* Copyright (C) 2024-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -22,7 +22,9 @@ static inline std::string getTimestamp() {
std::stringstream ss;
ss << "[" << std::put_time(&timeInfo, "%Y-%m-%d %H:%M:%S") << "] ";
char buffer[32];
std::strftime(buffer, sizeof(buffer), "[%Y-%m-%d %H:%M:%S] ", &timeInfo);
ss << buffer;
return ss.str();
}