Documentation
¶
Index ¶
- type LogHandler
- type LogHandlerOption
- func LogHandlerWithHandlerOptions(opts *slog.HandlerOptions) LogHandlerOption
- func LogHandlerWithIoWriter(w io.Writer) LogHandlerOption
- func LogHandlerWithLevel(level slog.Level) LogHandlerOption
- func LogHandlerWithLumberjack(lumberjackLog *lumberjack.Logger) LogHandlerOption
- func LogHandlerWithLumberjackDefault() LogHandlerOption
- func LogHandlerWithStrLevel(level string) LogHandlerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogHandler ¶
func NewLogHandler ¶
func NewLogHandler(opts ...LogHandlerOption) (l *LogHandler)
NewLogHandler 创建日志处理器
func (*LogHandler) SetDefaultLog ¶
func (l *LogHandler) SetDefaultLog()
type LogHandlerOption ¶
type LogHandlerOption func(*LogHandler)
func LogHandlerWithHandlerOptions ¶
func LogHandlerWithHandlerOptions(opts *slog.HandlerOptions) LogHandlerOption
LogHandlerWithHandlerOptions 设置处理器配置
func LogHandlerWithIoWriter ¶
func LogHandlerWithIoWriter(w io.Writer) LogHandlerOption
LogHandlerWithIoWriter 修改配置io写入
func LogHandlerWithLevel ¶
func LogHandlerWithLevel(level slog.Level) LogHandlerOption
LogHandlerWithLevel 设置日志等级
func LogHandlerWithLumberjack ¶
func LogHandlerWithLumberjack(lumberjackLog *lumberjack.Logger) LogHandlerOption
* 日志切割配置
func LogHandlerWithLumberjackDefault ¶
func LogHandlerWithLumberjackDefault() LogHandlerOption
func LogHandlerWithStrLevel ¶
func LogHandlerWithStrLevel(level string) LogHandlerOption
LogHandlerWithStrLevel 设置日志等级(字符串)
Click to show internal directories.
Click to hide internal directories.