Logging
Logging is the dinosaur of observability. Like hammers, logging is simple and plainly useful. You don't need to think hard to understand how logging can help you see what your system is doing. Implementing a logger in your service is usually trivial. The first thing that we all learn is how to print "Hello world".
Unlike dinosaurs, logging is never going extinct.
Logging is here to stay. It's a very basic yet incredibly useful tool—the best combination. You can't stop logging. No one should stop logging. Never stop logging.
Conceptual Framework
When it comes to observability data, we often talk about three pillars:
- Logging: a set of list of events through systems.
- Tracing: a set of directed graph of events through systems.
- Metrics: an aggregated value representing events that occurred at a given location in a system.
When thinking of logs, a good mental model is that of a set of ordered list, where the order of items in each list is only preserved within the list. No global order exists: you cannot join lists and assume that there is a single valid order for logs that came from different lists.
A log is best viewed as a flat list of events that flowed through a system, where the only relationship between log lines is the happens before and happens after relationship within a single log source. It's like a primitive logbook. The order of pages makes sense only within that specific book. Attempting to order pages across different logbooks isn't inherently meaningful (though it can still be useful). The logbook provides information about what happened from the perspective of its authors. Sometimes, storylines in a logbook become intertwined, and it's left to the reader to untangle which pages belong to the same narrative thread.
Tracing, on the other hand, preserves a broader ordering of events, though at the cost of higher computational overhead and implementation complexity. See our deep dive into tracing for more details.
Logging for Humans
In recent years, a powerful trend toward structured logging has taken hold. The humanlog
CLI was initially created to address this development. A structured log is one written in an easily parseable structured format. In practice, this means newline-delimited JSON or logfmt.
Structured logging unlocks powerful capabilities. Traditional SIEM tools operated on arbitrarily shaped strings, often multiline messages, largely reliant on regular expression engines for semantic data extraction. In contrast, structured logging maintains clear semantic separation of data within each log line. Using plaintext and reasonably readable formats such as logfmt and JSON, modern logging enables both human-readable output and machine-parseable key-value pairs.
This approach comes with a trade-off. While still human-readable, JSON and logfmt lack the visual cues that more human-friendly plaintext formats provide. This is precisely where the humanlog
CLI's primary function becomes valuable.
We want you to leverage structured logging everywhere—at home, at work, in your car, basement, on vacation, even at your in-laws'. That's why humanlog
is first and foremost a structured logging helper tool. You feed it logs, and if they're structured, it transforms them into something much more readable, giving you immediate insight without any complicated setup.
Here's what raw structured logs look like, and how humanlog prettifies them.


humanlog
Logging for Machines
But why log in JSON or logfmt in the first place? Why not print colored logs to stdout
right away? Because in modern software, logs are (unfortunately) for machines first. In most case beyond local development, logs are never going to be seen by anyone but machines.
In production environments, your service operates alongside hundreds of other services, each emitting its own logs. These logs are typically extracted from individual services and aggregated in centralized repositories. Without structured logging, they amount to little more than arbitrary strings of bytes (hopefully printable UTF-8). With structured logging, however, the situation changes dramatically.
Maintaining logs in an unambiguously machine-parseable format provides significant advantages. Your logs become a powerful source of analytical data, while Humanlog's approach ensures rapid developer feedback loops and immediate insights into your system's behavior. With local processing capabilities, you get all the benefits of sophisticated log analysis with remarkably fast response times.
What's Next?
Need help or want to give feedback? Join our community channels.