[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()
This commit is contained in:
Milan Radosavljevic
2026-01-14 21:27:51 +01:00
committed by GitHub
parent 499127c0b9
commit 318d13870f
111 changed files with 2657 additions and 2602 deletions
@@ -23,7 +23,6 @@
#include "library/runtime.hpp"
#include "api.hpp"
#include "core/config.hpp"
#include "core/debug.hpp"
#include "core/defines.hpp"
#include "core/utility.hpp"
#include "library/thread_data.hpp"
@@ -43,6 +42,8 @@
#include <timemory/utility/declaration.hpp>
#include <timemory/utility/signals.hpp>
#include "logger/debug.hpp"
#include <array>
#include <csignal>
#include <cstdint>
@@ -192,8 +193,7 @@ setup_gotchas()
if(_initialized) return;
_initialized = true;
ROCPROFSYS_BASIC_DEBUG(
"Configuring gotcha wrapper around fork, MPI_Init, and MPI_Init_thread\n");
LOG_DEBUG("Configuring gotcha wrapper around fork, MPI_Init, and MPI_Init_thread");
component::mpi_gotcha::configure();
component::exit_gotcha::configure();