• /
  • EnglishEspañol日本語한국어Português
  • Inicia sesiónComenzar ahora

View ANSI colors in logs

April 22, 2024

Ingest logs with ANSI color codes to display in the log table

The records you view in the Logs UI are now color coded. This new addition displays log text in ANSI supported colors.

When a log line is ingested that has ANSI color codes attached to a log attribute, that log line is parsed and displayed automatically in the log table with the ANSI codes respected. You do not need to add additional parsing rules—just ensure that proper unicode escape characters are used in the logs. If no ANSI color codes are supplied at ingest, then the log line will be displayed in the default color of the log table.

Example log:

{
  message: "\u001b[36m Sample ANSI message \u001b[0m",
  logType: "sample"
}

Once the logs are ingested, go to the Logs UI where you'll see your log lines with their respective ANSI colors. Note: this update supports the extended 256 ANSI color set.

For more information on ingesting logs, read the Forwarding logs documentation.

"A screenshot of an example log with ANSI color coding."

A screenshot of an example log with ANSI color coding.
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.