Tag:log
All the articles with the tag "log".
Let's write our own logging package
Posted on:August 14, 2024 at 03:21 PMLet's do it ourselves! I will show you how to quickly write a log package with basic functions, so that you can master the core design ideas of the log package through this short log package.
Glog
Posted on:July 4, 2024 at 04:53 PMGlog is developed by Google. It is another light log package just like the Standard log package, but it supplies more useful features.
Logrus
Posted on:July 8, 2024 at 12:35 PMLogrus is the famous log package which gets the most star in the Github. It is Powerful, efficient and highly flexible, and provides the custom plugins feature as well.
Standard Go log package
Posted on:July 3, 2024 at 10:57 AMIt is out of the box with golang, when used it , we need create a log instance which is belong to *log.Logger class. We can use the variable std which is global and defined by the Go log package itself in the folder log and the file is log.go.
Zap
Posted on:July 9, 2024 at 04:32 PMZap is Uber's open source log package, which is famous for its high performance. Many companies' log packages are modified based on zap.
Log Functions
Posted on:July 17, 2024 at 12:11 PMAt present, although there are many excellent open source log packages for us to choose from, in a large system, these open source log packages may not be able to meet our customized needs. At this time, we need to develop our own log packages.
How to record logs?
Posted on:July 17, 2024 at 10:24 AMThe more logs there are, the better. In actual development, we often encounter a lot of useless logs, but not the logs we need; or the valid logs are overwhelmed by a large number of useless logs, making them very difficult to find.