opentelemetry-cpp
opentelemetry-cpp copied to clipboard
[Logs SDK] Log Appender for log4cxx
Log4cxx is one of the commonly used logging framework for C++, and it would be good to have the logging appender for the framework using logging bridge API.
More details:
Bridge API specs - https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md Bridge API implementation - https://github.com/open-telemetry/opentelemetry-cpp/tree/main/api/include/opentelemetry/logs Extending log4cxx - https://logging.apache.org/log4cxx/latest_stable/extending-log4cxx.html
The implementation should be part of the opentelemetry-cpp-contrib repo under the instrumentation directory.
also maybe glog?
Yes, actually I didn't find documentation for glog to write the data to appender/target. As an example for log4cxx - https://logging.apache.org/log4cxx/latest_stable/extending-log4cxx.html. But feel free to create a similar task for glog if it's possible.
This issue was marked as stale due to lack of activity.
Yes, actually I didn't find documentation for glog to write the data to appender/target. As an example for log4cxx - https://logging.apache.org/log4cxx/latest_stable/extending-log4cxx.html. But feel free to create a similar task for glog if it's possible.
Apparently, there is a LogSink class that can be used to redirect the logs somewhere else with the option to log to file at the same time. This is not very well documented but there are some unit tests showing the usage. I'm willing to give it a try and see what can be done with it.
Closing, this is now implemented in opentelemetry-cpp-contribs.