Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR simplifies the logging subsystem by removing the two extra verbose levels (VVVERBOSE, VVERBOSE), renaming SEVERE to ERROR, and consolidating per-request logs under VERBOSE. It also updates CMake defaults to reflect the new levels and trims workflow triggers.
- Remove
VVVERBOSE/VVERBOSEmacros and constants, migrate calls toVERBOSE - Rename
SEVERE_LEVELtoERROR_LEVELand updateERRORmacro - Adjust CMake logic for default
LOGLEVELand streamline GitHub Actions triggers
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| libCacheSim/traceReader/sampling/spatial.c | Replaced VVERBOSE with VERBOSE |
| libCacheSim/traceReader/sampling/SHARD.c | Fixed verbose call text and replaced with VERBOSE |
| libCacheSim/traceReader/reader.c | Swapped VVERBOSE to VERBOSE in skip/read logs |
| libCacheSim/traceReader/generalReader/txt.c | Changed VVERBOSE to VERBOSE during line reads |
| libCacheSim/include/libCacheSim/macro.h | Removed extra debug macros, consolidated verbose func |
| libCacheSim/include/libCacheSim/logging.h | Dropped VVVERBOSE/VVERBOSE definitions, updated ERROR |
| libCacheSim/include/libCacheSim/const.h | Deleted VVVERBOSE_LEVEL/VVERBOSE_LEVEL, added ERROR_LEVEL |
| libCacheSim/cache/eviction/LeCaR.c | Updated multiple VVERBOSE calls to VERBOSE |
| libCacheSim/cache/eviction/LFUDA.c | Migrated VVVERBOSE to VERBOSE |
| libCacheSim/cache/eviction/LFU.c | Replaced VVVERBOSE with VERBOSE |
| libCacheSim/cache/eviction/GLCache/eviction.c | Substituted VVERBOSE with VERBOSE |
| libCacheSim/cache/eviction/GLCache/GLCache.c | Changed VVERBOSE to VERBOSE on segment alloc |
| libCacheSim/cache/cache.c | Swapped two VVERBOSE logs for cache hits/misses |
| libCacheSim/cache/admission/adaptsize/adaptsize.cpp | Updated VVERBOSE calls to VERBOSE in reconfigure |
| CMakeLists.txt | Removed old levels, set defaults by build type |
| .github/workflows/code-quality.yml | Simplified triggers to on: [push, pull_request] |
Comments suppressed due to low confidence (3)
libCacheSim/include/libCacheSim/const.h:46
- You removed
VVVERBOSE_LEVELandVVERBOSE_LEVELconstants; ensure no remaining code or tests reference those levels to avoid undefined symbol errors.
#define ERROR_LEVEL 9
libCacheSim/include/libCacheSim/logging.h:63
- [nitpick] The change from
SEVERE_LEVELtoERROR_LEVELis correct, but consider adding a deprecation note or alias for backward compatibility if any third-party code still references the old level.
#if LOGLEVEL <= ERROR_LEVEL
libCacheSim/include/libCacheSim/macro.h:162
- You renamed the
find_maxmacro toFIND_MAX—verify that all call sites and tests were updated accordingly to prevent compilation failures.
#define FIND_MAX(array, n_elem, max_elem_ptr, max_elem_idx_ptr) \
| @@ -67,10 +53,14 @@ endif() | |||
|
|
|||
There was a problem hiding this comment.
The logic that sets LOGLEVEL based on unset LOG_LEVEL depends on build type, but CMAKE_BUILD_TYPE is set later. To avoid unexpected defaults, move the set(CMAKE_BUILD_TYPE Release) block before log-level conditions.
| set(CMAKE_BUILD_TYPE Release) |
|
The goal is that if there is no logging and build option, we use |
Got it. The current design is clear. One picky issue: should we consider tolower/toupper |
updated |
Refactor logging levels by removing VVERBOSE and adjusting log level definitions. Update logging calls throughout the codebase to use VERBOSE instead of VVERBOSE for consistency and clarity.
Updated the logic for setting default log levels based on the build type. Removed redundant checks and streamlined the configuration for log levels, ensuring appropriate defaults are set for both Debug and Release builds. This enhances clarity and maintainability of the build configuration.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
0f03786 to
59c74df
Compare
There was a problem hiding this comment.
Bug: Debug Build Logging Level Issue
Debug builds incorrectly default to INFO logging instead of DEBUG when LOG_LEVEL is "default". This occurs because the CMAKE_BUILD_TYPE_LOWER MATCHES "Debug" condition is case-sensitive, and CMAKE_BUILD_TYPE_LOWER is set to "debug" (lowercase).
CMakeLists.txt#L63-L64
Lines 63 to 64 in 59c74df
Was this report helpful? Give feedback by reacting with 👍 or 👎
Removes
VVERBOSEandVVVERBOSE, and renamesSEVEREtoERROR. Let us useVERBOSEfor per-request logging.