internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

@Title @Description @Author Wangwengang 2023/12/12 09:38 @Update Wangwengang 2023/12/12 09:38

@Title @Description @Author Wangwengang 2023/12/12 09:38 @Update Wangwengang 2023/12/12 09:38

@Title @Description @Author Wangwengang 2023/12/12 09:14 @Update Wangwengang 2023/12/12 09:14

Index

Constants

This section is empty.

Variables

View Source
var FileRotatelogs = new(fileRotatelogs)

Functions

func GetZapCores

func GetZapCores(config *sconfig.Slog) []zapcore.Core

GetZapCores 根据配置文件的Level获取 []zapcore.Core

Types

type Cutter

type Cutter struct {
	Director string // 日志文件夹
	// contains filtered or unexported fields
}

func NewCutter

func NewCutter(director string, level string, isAllInOne bool, options ...CutterOption) *Cutter

func (*Cutter) Write

func (c *Cutter) Write(bytes []byte) (n int, err error)

Write satisfies the io.Writer interface. It writes to the appropriate file handle that is currently being used. If we have reached rotation time, the target file gets automatically rotated, and also purged if necessary.

type CutterOption

type CutterOption func(*Cutter)

func WithCutterFormat

func WithCutterFormat(format string) CutterOption

WithCutterFormat 设置时间格式

type Sentry

type Sentry struct {
	// contains filtered or unexported fields
}

func (*Sentry) Write

func (c *Sentry) Write(bytes []byte) (n int, err error)

Jump to

Keyboard shortcuts

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