You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[rocprofiler-systems] Update logging to use spdlog library (#2428)
## Motivation
- Structured logging with proper log levels (TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL)
- Better performance through compile-time formatting
- Consistent formatting using fmt library
- Runtime log level control via arguments and environment variables
- Easier maintenance and debugging capabilities
## Technical Details
- Added spdlog as a submodule and integrated it into CMake build system
- Created new `rocprofiler-systems-logger` library wrapping spdlog functionality
- Replaced custom logging macros (`ROCPROFSYS_VERBOSE`, `ROCPROFSYS_DEBUG`, `ROCPROFSYS_FATAL`, `ROCPROFSYS_REQUIRE`, `ROCPROFSYS_CI_THROW`, etc.) with spdlog equivalents (`LOG_DEBUG`, `LOG_WARNING`, `LOG_CRITICAL`, etc.)
- Implemented log level control through command-line arguments and environment variables
- Converted assertion macros to proper error handling with exceptions and std::abort()
Copy file name to clipboardExpand all lines: projects/rocprofiler-systems/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,9 @@ Full documentation for ROCm Systems Profiler is available at [https://rocm.docs.
9
9
### Added
10
10
11
11
- Documentation for `--trace-legacy` / `-L` CLI flag for direct tracing mode.
12
+
- Added dependency to `spdlog` library.
13
+
- Added environment variable `ROCPROFSYS_LOG_LEVEL` which control level of logging.
14
+
- Available log levels: `critical`, `error`, `warning`, `info`(default), `debug`, `trace` and `off`.
12
15
13
16
### Changed
14
17
@@ -18,6 +21,7 @@ Full documentation for ROCm Systems Profiler is available at [https://rocm.docs.
18
21
-`--trace` / `-T` CLI flag enables tracing with cached mode by default.
19
22
-`--trace-legacy` / `-L` CLI flag enables legacy direct mode for tracing.
20
23
- Changed thread storage allocation from a hard-coded 4096-element array to a compile-time computed size derived from the ROCPROFSYS_MAX_THREADS configuration flag.
24
+
- Changed logging module to use `spdlog` library.
21
25
22
26
### Resolved issues
23
27
@@ -30,6 +34,7 @@ Full documentation for ROCm Systems Profiler is available at [https://rocm.docs.
0 commit comments