Accept multiline messages with id prefixing

When an exception occurs in Rails or Sinatra a multiline message that includes a stack trace is pushed into log appender.
As far as I can see each line has to be signed with the token in order to get through.
I've also added a random message id to be put in the beginning of each line so that in the multiprocess logging race it was still possible to put the message together.

Are there any other/better options to push a multiline log entry?