You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "jiaoew1991 (via GitHub)" <gi...@apache.org> on 2023/07/20 10:19:23 UTC

[GitHub] [incubator-opendal] jiaoew1991 opened a new issue, #2679: feat(binding/c): Add support for logging and other layers.

jiaoew1991 opened a new issue, #2679:
URL: https://github.com/apache/incubator-opendal/issues/2679

   I am trying to integrate C binding into our project and encountered some errors. The error message only contains an error code, so I cannot determine the specific cause of the error. After using some hacky methods, I found the reason for the error, but it is not very user-friendly for developers.
   
   There are many layers in opendal core, including logging, but C binding cannot use these layers yet. I hope to add support for them.
   
   In addition, there are no dependencies on log and env-logging in c binding's cargo. After adding these dependencies, logging can be printed correctly. I hope that c binding can add a method like "opendal_init_logger" to allow users to adjust the logging settings.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] jiaoew1991 commented on issue #2679: feat(binding/c): Add support for logging and other layers.

Posted by "jiaoew1991 (via GitHub)" <gi...@apache.org>.
jiaoew1991 commented on issue #2679:
URL: https://github.com/apache/incubator-opendal/issues/2679#issuecomment-1643689258

   > Just out of curiosity, @jiaoew1991, would you prefer a C++ binding instead of C?
   
   If there is a C++ version, it would be better, but if not, it won't affect the usage much. 😄


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] jiaoew1991 commented on issue #2679: feat(binding/c): Add support for logging and other layers.

Posted by "jiaoew1991 (via GitHub)" <gi...@apache.org>.
jiaoew1991 commented on issue #2679:
URL: https://github.com/apache/incubator-opendal/issues/2679#issuecomment-1643701156

   > > If use an external tool like glog, how can I make the logs inside opendal core be printed out?
   > 
   > There are something the we need to do in bindings:
   > 
   > * Use `glog` to implement `tracing-subscribe` so they can collect log print by opendal core
   > * Implement C binding's own `GlogLayer` to allow users to switch betweeen different logging tools.
   > 
   > In this way, our users of c/cpp binding can integrate their native logging tools.
   
   We use glog in our project, which is great as it reduces dependencies.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] jiaoew1991 commented on issue #2679: feat(binding/c): Add support for logging and other layers.

Posted by "jiaoew1991 (via GitHub)" <gi...@apache.org>.
jiaoew1991 commented on issue #2679:
URL: https://github.com/apache/incubator-opendal/issues/2679#issuecomment-1643691613

   > I perfer to integrate tools that existing in c or cpp ecosystem, like glog. Using `tracing` or `env-logger` in c/cpp projects seems not a good idea.
   
   If use an external tool like glog, how can I make the logs inside opendal core be printed out? 🤔


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #2679: feat(binding/c): Add support for logging and other layers.

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #2679:
URL: https://github.com/apache/incubator-opendal/issues/2679#issuecomment-1643666392

   I perfer to integrate tools that existing in c or cpp ecosystem, like glog. Using `tracing` or `env-logger` in c/cpp projects seems not a good idea.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #2679: feat(binding/c): Add support for logging and other layers.

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #2679:
URL: https://github.com/apache/incubator-opendal/issues/2679#issuecomment-1643686281

   Just out of curiosity, @jiaoew1991, would you prefer a C++ binding instead of C?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat(binding/c): Add support for logging and other layers. [opendal]

Posted by "Xuanwo (via GitHub) via commits" <co...@opendal.apache.org>.
Xuanwo closed issue #2679: feat(binding/c): Add support for logging and other layers.
URL: https://github.com/apache/opendal/issues/2679


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #2679: feat(binding/c): Add support for logging and other layers.

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #2679:
URL: https://github.com/apache/incubator-opendal/issues/2679#issuecomment-1643696355

   > If use an external tool like glog, how can I make the logs inside opendal core be printed out?
   
   There are something the we need to do in bindings:
   
   - Use `glog` to implement `tracing-subscribe` so they can collect log print by opendal core
   - Implement C binding's own `GlogLayer` to allow users to switch betweeen different logging tools.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat(binding/c): Add support for logging and other layers. [opendal]

Posted by "Xuanwo (via GitHub) via commits" <co...@opendal.apache.org>.
Xuanwo commented on issue #2679:
URL: https://github.com/apache/opendal/issues/2679#issuecomment-7082505470

   The default C operator constructor installs `RetryLayer` and `LoggingLayer`. Register a process-wide native log callback with `opendal_logging_init` and forward its records to your application logger. The explicit `opendal_operator_new_with_layers` constructor applies only the layers you supply, and C exposes configuration for Retry and Timeout. See #6201 and #7611.
   
   *(This comment was generated by AI.)*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org