opendal icon indicating copy to clipboard operation
opendal copied to clipboard

[core split] Layer: logging

Open Xuanwo opened this issue 2 months ago • 5 comments

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.

Xuanwo avatar Dec 08 '25 10:12 Xuanwo

/assign

zhiqiang-zz avatar Dec 12 '25 18:12 zhiqiang-zz

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:

  1. Split retry layer first → creates opendal-layer-retry
  2. Split logging layer second → creates opendal-layer-logging
  3. 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.

STRRL avatar Dec 12 '25 20:12 STRRL

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?

koushiro avatar Dec 16 '25 09:12 koushiro

Hi @STRRL , after merging #7025 , you can focus on splitting the logging layer now

koushiro avatar Dec 16 '25 10:12 koushiro

Hi @STRRL , after merging #7025 , you can focus on splitting the logging layer now

Awesome! Working on it!

STRRL avatar Dec 16 '25 16:12 STRRL