Vottun Log is a lightweight and flexible logging library for GoLang. It provides a simple interface for logging messages with different levels of severity. The library offers various features, including log level filtering, structured logging, and log output customization.
To use Vottun Log in your Go project, you need to have Go installed and set up. Once you have Go ready, you can install the package by running the following command:
go get github.com/vottunio/log
Here's a basic example of using Vottun Log in your Go code:
package main
import (
"github.com/vottunio/log"
)
func main() {
// sets log destination to the standard output. You can use a file instead.
log.SetOutput(os.Stdout)
// sets the log level to TRACE
log.LogLevel = log.TRACE
log.Debugln("This is a debug message")
log.Infoln("This is an informational message")
log.Warnln("This is a warning message")
log.Errorln("This is an error message")
log.Traceln("This is an trace message")
}
And the result is:
08:01:18.750460 INFO [main] This is an info message
08:01:18.750460 WARN [main] This is a warn message
08:01:18.750460 ERROR [main] This is an error message
08:01:18.750460 TRACE [main] This is a trace message
Vottun Log is licensed under the MIT License.
Visit us at https://vottun.com