GoogleCloudPlatform / appengine-java-vm-runtime

Apache License 2.0
67 stars 34 forks source link

reenable traceid logic in the logs #184

Open ludoch opened 8 years ago

ludoch commented 8 years ago

It seems that https://github.com/GoogleCloudPlatform/appengine-java-vm-runtime/pull/93/files did not take care of the logic for logging traceid. It got removed.

There is a test showing how to do it in https://github.com/GoogleCloudPlatform/appengine-java-vm-runtime/blob/master/appengine-java-logging/src/test/java/com/google/apphosting/logging/JsonFormatterTest.java search for "traceId"

There is no real doc for that (shame-) but we need to have the correct LogContext with the traceid when possible.

ludoch commented 8 years ago

Also, I did not follow this area, but I am confused with VmRuntimeLogHandler versus VmRuntimeFileLogHandler

ludoch commented 8 years ago

My understanding is that we would not need anymore VmRuntimeLogHandler but it would be nice if we can keep the compat way of defining java.util.logging.config.file for log levels?

ludoch commented 8 years ago

As a side effect VmAppLogsWriter would disappear.

ludoch commented 8 years ago

I think java.util.logging.config.file is already covered by standard, so this might not be an issue at all. Just some cleanup and adding the traceid is needed.

ludoch commented 8 years ago

Hi @gregw: let me know if you have time to look at this one, or I will look at it.

gregw commented 8 years ago

I've not yet looked at this. If you don't get it done then I can look at it Wednesday or Thursday.