I am just getting started with Node and Docker and I am trying to use the docker logging drivers for graylog. I have it working, but I ran into a problem when node prints out a stacktrace. Since docker sends each newline to graylog a stacktrace ends up split up in a bunch of separate logs.
I asked the docker group about this and they said they have no way of knowing when a log starts and ends, so they can't help.
I was wondering if there was a way to get node to output each error and debug on a single line in json object or something similar?
the logs in graylog look like this, which you can see is not helpful

I am just getting started with Node and Docker and I am trying to use the docker logging drivers for graylog. I have it working, but I ran into a problem when node prints out a stacktrace. Since docker sends each newline to graylog a stacktrace ends up split up in a bunch of separate logs.
I asked the docker group about this and they said they have no way of knowing when a log starts and ends, so they can't help.
I was wondering if there was a way to get node to output each error and debug on a single line in json object or something similar?
the logs in graylog look like this, which you can see is not helpful
