-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Milestone
Description
Summary
The Syndication_Logger class has an option storage code path (lines 347-377) that is unreachable through the public API.
Background
PR #53 (2015) introduced the logging framework with two storage types:
object- stores logs in post meta (implemented and used)option- stores logs in WP options (implemented but unreachable)
The error message at line 300 references a log_option method:
"You need to provide a valid post_id or use log_option instead"
However, log_option() was never implemented. All public methods hardcode storage_type = 'object':
log_post_error()→log_post()→log('object', ...)log_post_success()→log_post()→log('object', ...)log_post_info()→log_post()→log('object', ...)
Recommendation
Either:
- Remove the dead code - Delete the option storage branch (lines 347-377) and update the error message
- Implement the feature - Add
log_option_error(),log_option_success(),log_option_info()methods if there's a use case
Option 1 is recommended unless there's a known need for option-based logging.
Related
- PR Logging framework relating to Automattic/syndication#20 and Automattic/syndication#45 #53 introduced this code
- Issues Pull: Disable the endpoint on too many failures #20 and Auto retry #45 were the original drivers for the logging framework
Metadata
Metadata
Assignees
Labels
No labels