Colorize Spring Boot Logs in Sublime Text with the ANSIescape Plugin

This guide explains how to install and use the ANSIescape plugin in Sublime Text to render Spring Boot console logs with proper colors, eliminating unreadable ANSI escape codes and providing step‑by‑step instructions, troubleshooting tips, and ways to revert to plain logs.

Selected Java Interview Questions
Selected Java Interview Questions
Selected Java Interview Questions
Colorize Spring Boot Logs in Sublime Text with the ANSIescape Plugin

Introduction

Spring Boot console logs include ANSI color codes that help differentiate log levels, but when opened in Sublime Text they appear as garbled characters such as [31m and [0;39m. Installing the ANSIescape plugin allows Sublime Text to interpret and display these colors correctly.

Preview

Before and after screenshots illustrate how the log looks without the plugin versus with colorized output.

Prerequisites

Make sure Sublime Text and Package Control are installed. If Package Control is missing, install it by opening the console ( Ctrl+ on Windows/Linux, Cmd+ on macOS), visiting the official installation page, copying the provided code, pasting it into the console, and restarting Sublime Text.

Install ANSIescape Plugin

1. Press Ctrl+Shift+P (or Cmd+Shift+P on macOS) to open the command palette. 2. Type Install Package and press Enter. 3. Type ANSIescape, select it from the list, and install.

Enable Colorized Logs

Open your Spring Boot .log file in Sublime Text.

Press Ctrl+Shift+P, type ANSI, and choose ANSIescape: Colorize. The log colors are rendered instantly, matching terminal output.

How to Revert to Plain Logs

Method 1: Close and Reopen

Close the file and reopen it with Sublime Text; the original ANSI codes become visible again.

Method 2: Undo

Press Ctrl+Z (or Cmd+Z) to undo the ANSIescape: Colorize command.

Method 3: Uninstall Plugin

Press Ctrl+Shift+P (or Cmd+Shift+P), type Remove Package, press Enter.

Select ANSIescape and confirm removal.

Common Issues

Plugin Not Found

Ensure Package Control is correctly installed and that you can access packagecontrol.io.

No Color Change

Verify the log file actually contains ANSI escape sequences (e.g., [31m) and that you have executed ANSIescape: Colorize.

Disable Colors in Future Logs

Add the following line to application.properties to stop Spring Boot from emitting ANSI codes:

spring.output.ansi.enabled=never
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Spring BootSublime TextANSI escape codesplugin installationlog colorization
Selected Java Interview Questions
Written by

Selected Java Interview Questions

A professional Java tech channel sharing common knowledge to help developers fill gaps. Follow us!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.