Zap Concepts: Difference between revisions
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
Zap is a logging framework for Go. It provides fast, [[Logging#Structured_Logging|structured]], [[#Logging_Levels|leveled]] logging. | Zap is a logging framework for Go. It provides fast, [[Logging#Structured_Logging|structured]], [[#Logging_Levels|leveled]] logging. | ||
Logging is performing by | Logging is performing by creating a <code>Logger</code> object and using its logging API. Each logging invocation creates a log event with key/value pairs. <font color=darkkhaki>What about the log message?</font>. Depending on the <code>encoder?</code>, the rendering of the log events can be controlled. Rendering. | ||
There is no global logger that can be used right away, though one can be configured. | There is no global logger that can be used right away, though one can be configured. |
Revision as of 19:51, 13 March 2024
Internal
TODO
Deplete from Zap_Concepts_TODEPLETE
Overview
Zap is a logging framework for Go. It provides fast, structured, leveled logging.
Logging is performing by creating a Logger
object and using its logging API. Each logging invocation creates a log event with key/value pairs. What about the log message?. Depending on the encoder?
, the rendering of the log events can be controlled. Rendering.
There is no global logger that can be used right away, though one can be configured.
There are two APIs, Logger
and SugaredLogger
.
The supported logging levels are: .... Errors require special attention. More details are available in the Logging Levels section.