Categorygithub.com/tinystack/logger
modulepackage
0.1.5
Repository: https://github.com/tinystack/logger.git
Documentation: pkg.go.dev

# README

logger

Go logger Package

示例

import "github.com/tinystack/logger"

// 创建新实例
newLogger := NewLogger(
    logger.WithWriter(os.Stdout),
    logger.WithEncoder(EncoderJSON),
    logger.WithCaller(true),
    logger.WithLevel(DebugLevel),
)

// 打印日志
newLogger.Info("print logger message")
newLogger.Infof("print logger message: %s", "string message")
newLogger.Infot("print logger message", logger.T{"key1": "value1", "key2": T{"key3": "value3"}})

// 更新全局默认实例
logger.UpdateDefaultLogger(newLogger)

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author