[core split] Layer: logging
This issue tracks splitting the layer logging out of core as part of the core-split effort.
Tracking issue: #6829
Please follow the steps in the tracking issue strictly:
- keep public API/behavior unchanged;
- move code into the new crate layout described there;
- add/update feature flags and tests as required;
- open a PR and link it to #6829.
/assign
Hi Xunao, I'm working on issue #6939 (split logging layer), but I've discovered a dependency issue:
The retry layer tests in core/core/src/layers/retry.rs use LoggingLayer for debugging. If I split logging first, there's a circular dependency problem:
- opendal-layer-logging depends on opendal-core
- opendal-core tests can't use opendal-layer-logging as dev-dependency (Cargo sees two different crate instances)
Proposed approach:
- Split retry layer first → creates opendal-layer-retry
- Split logging layer second → creates opendal-layer-logging
- opendal-layer-retry can then use opendal-layer-logging as a dev-dependency for its tests
This message is also composed by AI.
BTW @zhiqiang-zz is also me, sorry for the messing 🤪
I see somebody already started working on https://github.com/apache/opendal/issues/6947, I am not sure it's OK that let me take over.
I think perhaps we should first split the opendal_core::raw::tests module into a separate crate to resolve dependency conflicts. BTW, it's a bit odd that the tests module is exported from opendal_core::raw.
And considering that the retry layer and timeout layer both use each other in their respective docs or tests, we could complete both #6947 and #6950 in a single PR.
@Xuanwo what do you think?
Hi @STRRL , after merging #7025 , you can focus on splitting the logging layer now