proxy.golang.org : github.com/topi314/tint
Package tint implements a zero-dependency slog.Handler that writes tinted (colorized) logs. The output format is inspired by the zerolog.ConsoleWriter and slog.TextHandler. The output format can be customized using Options, which is a drop-in replacement for slog.HandlerOptions. Colors can be customized using the `Options.LevelColors` and `Options.Colors` attributes. See tint.Options for details. Options.ReplaceAttr can be used to alter or drop attributes. If set, it is called on each non-group attribute before it is logged. See slog.HandlerOptions for details. Colors are enabled by default and can be disabled using the Options.NoColor attribute. To automatically enable colors based on the terminal capabilities, use e.g. the go-isatty package. Color support on Windows can be added by using e.g. the go-colorable package.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/topi314/tint
License: MIT
Latest release: over 1 year ago
First release: over 1 year ago
Namespace: github.com/topi314
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 17 days ago