Dear ivy team support,Currently, I'm doing some configuration for the ivy log in GCP environment. Here is my config:
But I got the problem: With the exception, it will print each line of exception in the stackDriver log like this picture: We use fluentd and Stackdriver to display the log.
When I check step 2, it is correct because the fluentd displayed exactly the result of step 1. Thank you asked 30.06.2020 at 00:38 nndiem |
I think this is a common problem of at least Java services. You can solve this problem with fluentd itself
It seems that in Log4j2 there is a configurable solution for this. It can also be done in log4j1 (current version in ivy) but it's not that easy to correctly implement it in ivy. https://stackoverflow.com/questions/38486248/how-to-make-log4j-syslog-appender-write-a-stack-trace-in-one-line/55407412#55407412 I recommend to solve it in fluentd for now. On our side we plan to upgrade to log4j2. answered 13.07.2020 at 02:59 Alex Suter ♦♦ |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 30.06.2020 at 00:38
Seen: 2,486 times
Last updated: 13.07.2020 at 03:09
Hello @nndiem, as I understand your setup fluentd reads the ivy.log and passes the logs to stackdriver. So fluentd would have to read the whole stacktrace as one and not each line separately, meaning it doesn't matter what you configure in log4j, fluentd will still read it in single lines.
You could try using a fluentd plugin like this: https://github.com/GoogleCloudPlatform/fluent-plugin-detect-exceptions
Make sure the messages are caught by their java rules: https://github.com/GoogleCloudPlatform/fluent-plugin-detect-exceptions/blob/master/lib/fluent/plugin/exception_detector.rb