A simple, customizable logging library for Go programs with support for custom message formats and log levels.
go-logger is a simple logging library for Go programs that enables developers to add customizable logging with minimal setup. It supports custom log formats, multiple log levels (Critical, Error, Warning, Notice, Info, Debug), and optional color output, making it easy to integrate structured logging into applications.
Go developers who need a lightweight, easy-to-use logging solution for their applications without the overhead of more complex logging frameworks.
Developers choose go-logger for its simplicity, custom formatting capabilities, and straightforward API, offering essential logging features without unnecessary complexity.
Simple logger for Go programs. Allows custom formats for messages.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports defining log message formats using verbs like %{module}, %{level}, and %{time}, allowing precise control over output structure as detailed in the formatting section.
Offers six log levels from Critical to Debug with dynamic filtering, enabling granular verbosity control as shown in the example with SetLogLevel.
Provides optional colored output for terminals, enhancing readability with a simple flag during logger initialization, as mentioned in the preview and example.
Includes ability to print stack traces as error messages via log.StackAsError, aiding in debugging without external tools.
Logs can be written to any io.Writer, with os.Stderr as default, allowing easy redirection to files or other streams as demonstrated in the example.
Missing common logging library features like native JSON output, log rotation, or asynchronous logging, which limits its use in complex, production-grade systems.
Has a smaller community and fewer integrations compared to alternatives like logrus or zap, reducing support for plugins, hooks, or monitoring tool compatibility.
The constructor returns an error that must be manually checked, adding boilerplate code, and there's no built-in recovery for logging failures or advanced error management.