Categorygithub.com/eachinchung/log
modulepackage
1.4.0
Repository: https://github.com/eachinchung/log.git
Documentation: pkg.go.dev

# README

log

基于 zap 包封装的日志库。

# Functions

Debug method output debug level log.
Debugf method output debug level log.
Debugw method output debug level log.
Error method output error level log.
Errorf method output error level log.
Errorw method output error level log.
Fatal method output fatal level log.
Fatalf method output fatal level log.
Fatalw method output Fatalw level log.
Flush 调用底层 Core 的 Sync 方法,刷新所有缓冲的日志条目。 应用程序应注意在退出前调用 Sync。.
FromContext 返回 ctx 上的 Logger。.
Info method output info level log.
Infof method output info level log.
Infow method output info level log.
Init 使用指定的选项初始 logger。.
L method output with specified context value.
New 通过 opts 创建 logger。.
NewLogger 使用给定的 Zap Logger 创建一个新的 log.Logger 来记录日志。.
NewOptions 创建一个带有默认参数的 Options 对象。.
Panic method output panic level log and shutdown application.
Panicf method output panic level log and shutdown application.
Panicw method output panic level log.
StdErrLogger 返回标准库的 logger,该 logger 在 error level 写入提供的 zap logger。.
StdInfoLogger 返回标准库的 logger,该 logger 在 info level 写入提供的 zap logger。.
SugaredLogger 返回全局 sugared logger.
V 返回一个分级的 InfoLogger。.
Warn method output warning level log.
Warnf method output warning level log.
Warnw method output warning level log.
WithContext 返回设置日志值的上下文副本。.
WithName 为 logger 的名称添加一个新的路径段。默认情况下,记录器是未命名的。.
WithValues 创建一个 child logger 并向其添加 Zap 字段。.

# Constants

定义常见的日志字段。.
定义常见的日志字段。.

# Variables

key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
DebugLevel 日志通常是大量的,并且通常在生产中被禁用。.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
ErrorLevel 日志是高优先级的。 如果应用程序运行顺利,则不应生成任何错误级别的日志。.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
FatalLevel 记录一条消息,然后调用 os.Exit(1)。.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
InfoLevel 是默认的日志记录优先级。.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
PanicLevel 记录一条消息,然后 Panic。.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
key-value 函数goland:noinspection GoUnusedGlobalVariable,SpellCheckingInspection.
WarnLevel 日志比 Info 更重要,但不需要单独人工审查。.

# Structs

Options 日志相关的配置项。.

# Interfaces

InfoLogger 表示能够以特定的详细程度记录非错误消息。.
Logger 记录日志消息。.

# Type aliases

Field 字段类型.
Level 级别类型.