2

I am using node.js for an internal application. docker image of this node.js application is deployed. Once deployed I see all the console.logs in SumoLogic but all the logs come as one big message. This makes it really difficult to debug in production. Is there a way to break my logs into separate messages in SumoLogic?

priyanshu sinha
  • 595
  • 6
  • 14

1 Answers1

1

See the docs for "Multiline Processing". Basically you can configure how should Sumo Logic split large messages into multiple ones. Check if you have this turned on:

  • "Infer boundaries":

This option will apply a set of default expressions, which are used to detect the beginning of a new multi-line message. When a message line matches one of these expressions, Sumo Logic waits until the next instance of this same expression, and then groups all lines between them as a single message.

And also "Boundary Regex" where you can specify a regular expression on what to be treated as a boundary between two log messages. Note that it's not always a line break as in some of the languages/frameworks you often get some structured data as one "piece of log". To be honest, I am not sure what is the nodejs standard here.

Disclaimer: I am currently employed by Sumo Logic.

Grzegorz Oledzki
  • 23,614
  • 16
  • 68
  • 106