lidavidm commented on issue #2824:
URL: https://github.com/apache/arrow-adbc/issues/2824#issuecomment-2943131573

   Currently to enable logs we look for env vars like 
ADBC_DRIVER_SNOWFLAKE_LOG_LEVEL. This prints to console. This only works in 
SO/DLL builds because the logic is in the wrapper that produces shared 
libraries, and not in the driver/driver framework.
   
   I'm thinking that when OTEL_LOGS_EXPORTER is additionally set (and isn't 
empty or "none"), then we should use 
[otelslog](https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelslog) to 
direct the logs to OTEL instead. Then they _should_ naturally end up in the 
OTEL exporter, and ideally in the custom log file. Otherwise we don't add any 
extra or custom config.
   
   This does have the disadvantage that setting the option inside code won't do 
anything. We could add a separate path that looks for OTEL_LOGS_EXPORTER and if 
so, overrides any configured exporter with the otelslog exporter instead. (Code 
using Go APIs directly can additionally use DatabaseLogging.SetLogger for full 
control; this would only be for code using the driver over FFI.)
   
   @zeroshade @birschick-bq any comments?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to