Skip to content

Remove deprecated file/line/function log() method from ILogger#225

Merged
kcenon merged 3 commits into
mainfrom
feature/217-remove-deprecated-apis
Dec 22, 2025
Merged

Remove deprecated file/line/function log() method from ILogger#225
kcenon merged 3 commits into
mainfrom
feature/217-remove-deprecated-apis

Conversation

@kcenon

@kcenon kcenon commented Dec 22, 2025

Copy link
Copy Markdown
Owner

Summary

  • Remove deprecated ILogger::log(level, message, file, line, function) method that was deprecated in v2.0.0
  • Update all test logger implementations to remove the deprecated method override
  • Update documentation to reflect the API removal

Breaking Change

Custom ILogger implementations must remove their override of the deprecated method:

// Remove this method from your implementation:
VoidResult log(log_level level,
               const std::string& message,
               const std::string& file,
               int line,
               const std::string& function) override;

Use the source_location-based method instead:

VoidResult log(log_level level,
               std::string_view message,
               const source_location& loc = source_location::current()) override;

Changes

  • logger_interface.h: Removed deprecated method, updated default implementation
  • global_logger_registry.h: Removed deprecated method from NullLogger
  • Test files: Updated all test logger implementations
  • Documentation: Updated DEPRECATION.md, CHANGELOG.md, API_REFERENCE.md (both EN/KO)

Test Plan

  • All 105 unit and integration tests pass
  • Build succeeds on macOS with Clang
  • Documentation updated with migration guide

Closes #217

Remove the deprecated ILogger::log() method that accepted file, line,
and function parameters separately. This method was deprecated in v2.0.0
and is now removed as planned for v3.0.0.

The source_location-based log() method remains as the preferred approach,
automatically capturing source location at the call site.

Breaking change:
- Custom ILogger implementations must remove their override of the
  deprecated log(level, message, file, line, function) method.

Closes #217
Update all test logger implementations to remove the deprecated
file/line/function log() method override, now that the method has
been removed from the ILogger interface.

Test loggers now only override:
- log(level, message)
- log(level, string_view, source_location)
- log(log_entry)

All 105 tests pass with the updated implementations.
- DEPRECATION.md/KO: Move file/line/function log() from deprecated to
  removed section, update migration guides
- CHANGELOG.md/KO: Add breaking change entry for v3.0.0 API removal
- API_REFERENCE.md/KO: Remove deprecated method from interface docs,
  update usage examples

See migration guide in docs/DEPRECATION.md for updating custom ILogger
implementations.
@kcenon kcenon merged commit 7eceda8 into main Dec 22, 2025
19 checks passed
@kcenon kcenon deleted the feature/217-remove-deprecated-apis branch December 22, 2025 06:28
kcenon added a commit that referenced this pull request Apr 13, 2026
* refactor(logger): remove deprecated file/line/function log() method

Remove the deprecated ILogger::log() method that accepted file, line,
and function parameters separately. This method was deprecated in v2.0.0
and is now removed as planned for v3.0.0.

The source_location-based log() method remains as the preferred approach,
automatically capturing source location at the call site.

Breaking change:
- Custom ILogger implementations must remove their override of the
  deprecated log(level, message, file, line, function) method.

Closes #217

* test(logger): update test logger implementations for v3.0.0

Update all test logger implementations to remove the deprecated
file/line/function log() method override, now that the method has
been removed from the ILogger interface.

Test loggers now only override:
- log(level, message)
- log(level, string_view, source_location)
- log(log_entry)

All 105 tests pass with the updated implementations.

* docs: update documentation for deprecated API removal

- DEPRECATION.md/KO: Move file/line/function log() from deprecated to
  removed section, update migration guides
- CHANGELOG.md/KO: Add breaking change entry for v3.0.0 API removal
- API_REFERENCE.md/KO: Remove deprecated method from interface docs,
  update usage examples

See migration guide in docs/DEPRECATION.md for updating custom 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: Remove deprecated APIs in v0.3.0.0

1 participant