Creating a lightweight ANSI color logger for Java CLI applications.
For a long time, whenever I needed colorful terminal output, I reached for Python.
Not because Python was necessarily the best language for the task, but because libraries like Colorama made command-line applications feel pleasant to build.
A few lines of code and suddenly a terminal application could communicate clearly through color, symbols, and formatting.
Then I started writing more Java.
And I found myself asking a surprisingly simple question:
Where’s the Java equivalent?
There were logging frameworks.
There were configuration-heavy solutions.
There were enterprise-grade libraries.
But I couldn’t find the kind of lightweight, developer-friendly logger I was looking for.
So I built one.
Most command-line applications communicate entirely through text.
That works.
Until the application grows.
Soon you have:
Everything begins looking the same.
Warnings blend into information.
Errors disappear in a sea of console output.
The human eye has to do all the work.
Color solves that problem instantly.
FANSI Logger was designed around a single idea:
Important messages should look important.
Instead of writing:
you can write:
or
or
and immediately get visual distinction between different message types.
Once the color system existed, I started adding additional quality-of-life features.
Section headers:
Dividers:
Status symbols:
These small additions dramatically improved readability in larger CLI projects.
Not every feature was built purely for productivity.
Some were built because command-line applications deserve personality.
One of my favorites is the typing effect:
Instead of printing instantly, the text appears character by character.
Is it necessary?
Not at all.
Is it fun?
Absolutely.
And sometimes that’s reason enough.
While building FANSI Logger I tried to keep a few rules in mind:
The goal wasn’t to compete with enterprise logging frameworks.
The goal was to make small command-line projects feel better.
One of the most rewarding parts of the project wasn’t writing the code.
It was publishing it.
For the first time, I packaged a Java library, published it to Maven, and made it available for other developers to use in their own projects.
Seeing:
felt strangely satisfying.
The project had gone from a personal utility to something anyone could install.
FANSI Logger reinforced something I’ve learned repeatedly through side projects:
The best projects often start with a small annoyance.
I wasn’t trying to create a logging ecosystem.
I wasn’t trying to build the next major Java framework.
I simply missed a tool I enjoyed using in another language.
So I built my own version.
Sometimes that’s all a project needs.
FANSI Logger currently focuses on colorful terminal output and simple formatting utilities.
Future versions may explore:
But the core idea will remain the same:
Make command-line applications easier to read and a little more enjoyable to use.