Zap Concepts: Difference between revisions
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
=Overview= | =Overview= | ||
Zap is . | Zap is a logging framework for Go. It provides fast, [[Logging#Structured_Logging|structured]], [[#Logging_Levels|leveled]] logging. | ||
Logging is performing by first creating a <code>Logger</code> object. 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. | Logging is performing by first creating a <code>Logger</code> object. 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. | ||
Line 16: | Line 16: | ||
There are two APIs, <code>Logger</code> and <code>SugaredLogger</code>. | There are two APIs, <code>Logger</code> and <code>SugaredLogger</code>. | ||
The supported logging levels are: .... Errors require special attention. | The supported logging levels are: .... Errors require special attention. More details are available in the [[#Logging_Levels|Logging Levels]] section. | ||
=Logging Levels= |
Revision as of 19:50, 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 first creating a Logger
object. 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.