Help Docs

Multiline logs

Multiline logs are log messages that are made of multiple lines. You can upload and manage multiline logs in Site24x7. Learn more about log management with Site24x7.

Getting started

  1. Log in to your Site24x7 account.
  2. Download and install the Site24x7 Server Monitoring agent (Windows | Linux). 
  3. Go to Admin > AppLogs > Log Profile and Add Log Profile.

All you have to do is add <NewLine> in your log pattern every time you add a new line to your log. That way, the Site24x7 agent can parse the multiline log correctly.

Example

Let's consider the following multiline log:

Oct 30, 2018 12:27:24 AM com.blackstar.database.DatabaseUtils
getDatabase DEBUG:
Uncaught errors Error: Callback was already called

If you want to create a new log type based on a multiline log like the one above, you need to break up the log using <NewLine>. Here's an example using the multiline log above:

Oct 30, 2018 12:27:24 AM com.blackstar.database.DatabaseUtils<NewLine>getDatabase DEBUG:<NewLine>Uncaught errors Error: Callback was already called

Log pattern:

Aside from adding <NewLine> to break up the multiline log, you also need to enter a log pattern while creating a new log type. This is how you should enter the log pattern for the sample multiline log above.

$Datetime:date$ $ClassName$<NewLine>$Method$ $LogLevel$:<NewLine>$message$
Note

If a multiline log contains exception traces, Site24x7 will only take the first 100 lines in that trace by default.

Was this document helpful?

Would you like to help us improve our documents? Tell us what you think we could do better.


We're sorry to hear that you're not satisfied with the document. We'd love to learn what we could do to improve the experience.


Thanks for taking the time to share your feedback. We'll use your feedback to improve our online help resources.

Shortlink has been copied!