Exploring Go standard logging
In this section, we will look at the default logging library provided by the Go language. Go provides a rich set of libraries; however, like every other library, there are limitations – it does not provide leveled logging (INFO
, DEBUG
, etc.), file log file features, and many more. These limitations can be overcome by using open source logging libraries.
Go provides very diverse and rich standard libraries for applications. Logging is one of them, and it is available inside the log
package. The following documentation link provides complete information on the different functions available inside the https://pkg.go.dev/log@latest package.
Another package that is available in Go standard library is the fmt
package, which provides functions for I/O operations such as printing, input, and so on. More information can be found at https://pkg.go.dev/fmt@latest
. The available functions inside the log
package are similar to the fmt
package, and when...