I think you're missing the point of this package.

Firstly, it is a _library_, not a daemon, so it is intended to be compiled / linked into other Go applications. It provides an easy jumping-off point for developers to customize the output of logs, particularly with respect to color and syntax highlighting, which is quite helpful during the development and debugging phase of writing software.

I doubt that it is of much interest to production deployments, which will typically not be logging to a console. However, it is trivial to configure tint to detect whether it is logging to a tty or not, and disable color accordingly.

The key-value functionality is not inherent to tint - that is part of Go's standaring library log/slog package.

For comparison's sake, the older sirupsen/logrus package also featured color output by default on ttys. That package is no longer actively developed (and predates log/slog by many years), so developers are likely to be looking for alternatives.

tint is currently imported by 164 other Go packages. It's only a matter of time before one of those Go packages needs to be packaged in Debian.

On 21.03.24 00:31, Salvo Tomaselli wrote:
journalctl does this, assuming that the journald or syslog protocols are used.

If stdout is used to log everything then it won't work.

Personally I prefer when software uses syslog, then I can filter by severity
directly, and the colours work too, of course.

journald protocol lets software define arbitrary keys and values.

Just a suggestion.

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to