Skip to content

refactor: migrate from deprecated common_system APIs before v3.0.0#249

Merged
kcenon merged 2 commits into
mainfrom
feature/248-migrate-deprecated-common-system-apis
Dec 22, 2025
Merged

refactor: migrate from deprecated common_system APIs before v3.0.0#249
kcenon merged 2 commits into
mainfrom
feature/248-migrate-deprecated-common-system-apis

Conversation

@kcenon

@kcenon kcenon commented Dec 22, 2025

Copy link
Copy Markdown
Owner

Summary

  • Add source_location-based log() method to common_system_logger_adapter
  • Update deprecated log() method with explicit file/line/function to delegate to new source_location-based implementation
  • Redirect THREAD_LOG_* macros to common_system's LOG_* macros when available
  • Suppress deprecation warnings in backward compatibility tests

Changes

common_system_adapter.h

  • Added new log(log_level, std::string_view, const source_location&) override
  • Legacy log(log_level, string, file, line, function) now delegates to new API
  • Added source_location.h include

logger_interface.h

  • Moved macros outside namespace to fix include order issues
  • When common_system is available, THREAD_LOG_* macros redirect to LOG_*
  • Removed redundant macro definitions that caused compiler warnings
  • Preserved standalone fallback for builds without common_system

Tests

  • Added deprecation warning suppression in ilogger_interface_test.cpp for backward compatibility testing

Test Plan

  • Build succeeds without deprecation warnings
  • All 9 tests pass
  • Verified THREAD_LOG_* macros redirect to LOG_* when common_system is available

Related Issues

Closes #248

- Add source_location-based log() method to common_system_logger_adapter
- Update deprecated log() method with explicit file/line/function to
  delegate to new source_location-based implementation
- Redirect THREAD_LOG_* macros to common_system's LOG_* macros
- Suppress deprecation warnings in backward compatibility tests

Closes #248
Add documentation for Issue #248:
- Document source_location-based logging API changes
- Add migration guide for THREAD_LOG_* to LOG_* macros
- Add migration guide for ILogger implementations
@kcenon kcenon merged commit 1f493f7 into main Dec 22, 2025
29 checks passed
@kcenon kcenon deleted the feature/248-migrate-deprecated-common-system-apis branch December 22, 2025 01:46
kcenon added a commit that referenced this pull request Apr 13, 2026
)

* refactor: migrate to source_location-based logging API

- Add source_location-based log() method to common_system_logger_adapter
- Update deprecated log() method with explicit file/line/function to
  delegate to new source_location-based implementation
- Redirect THREAD_LOG_* macros to common_system's LOG_* macros
- Suppress deprecation warnings in backward compatibility tests

Closes #248

* docs: update CHANGELOG for deprecated API migration

Add documentation for Issue #248:
- Document source_location-based logging API changes
- Add migration guide for THREAD_LOG_* to LOG_* macros
- Add migration guide for ILogger implementations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deprecation: Migrate from deprecated common_system APIs before v0.3.0.0

1 participant