-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I write logs to a file #1600
Comments
hi @xieao! are you trying to export spans to a file, or send agent debug logging to a file? |
I also think that writing files is the right choice in many scenarios. |
so how to export spans to a file? |
are you looking for something like this? https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/logging-otlp we haven't hooked that up to the javaagent yet, primarily because there's no specification for it: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#exporter-selection |
no. how can i config the file path. use java.util.logging.Logger will remapping io.opentelemetry.javaagent.bootstrap.PatchLogger i try to use this config below, but it doesn't work private final Logger javaUtilLogger = Logger.getLogger("TRACING_JAVA_UTIL_LOGGER"); |
ah, that's an interesting use case, can you open an issue so we don't lose track of it? |
There's already #3413 -- @yingziisme would implementing that issue fix your problem? |
Closing in favor of #3413 |
I have a custom exporter, and i used the log like following code:
but the log show on STDOUT. How can I write the log to a file,how to configure this agent?
The text was updated successfully, but these errors were encountered: