mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
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:
committed by
Compute-Runtime-Automation
parent
59cb5098e7
commit
2720f2316c
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user