logger

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsoleLogger

func NewConsoleLogger() xlog.XLogger

NewConsoleLogger 控制台日志器

func NewLogrusLogger

func NewLogrusLogger(path string, opts ...func(*types.Option)) xlog.XLogger

NewLogrusLogger 文件日志器。使用 logrus 实现,支持日志文件自动分割

func RestyWrapper

func RestyWrapper(l xlog.XLogger) resty.Logger

RestyWrapper Resty 日志包装器

func WithFormat

func WithFormat(format xlog.LogFormat) func(*types.Option)

WithFormat 设置日志格式

func WithLevel

func WithLevel(level xlog.Level) func(*types.Option)

WithLevel 设置日志等级

func WithLevelString

func WithLevelString(levelText string) func(*types.Option)

WithLevelString 通过日志等级字符串设置 支持日志等级: panic, fatal, error, warn, info, debug, trace

func WithStack

func WithStack(stack xlog.Stack) func(*types.Option)

WithStack 设置日志存储方式

func WithStdPrint

func WithStdPrint(enabled bool) func(*types.Option)

WithStdPrint 设置是否控制台输出

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL