log

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFilteredStderr

func GetFilteredStderr(ctx context.Context) io.Writer

GetFilteredStderr 获取过滤后的标准错误输出(用于GUI)

func GetFilteredStdout

func GetFilteredStdout(ctx context.Context) io.Writer

GetFilteredStdout 获取过滤后的标准输出(用于GUI)

func GetLevel

func GetLevel() string

func GetLogPath

func GetLogPath() string

func GetStderr

func GetStderr(ctx context.Context) io.Writer

func GetStdout

func GetStdout(ctx context.Context) io.Writer

func GetWriter

func GetWriter(ctx context.Context) (writer io.Writer)

func NewGUIFilterWriter

func NewGUIFilterWriter(ctx context.Context, logger ILogger, isGUI bool) io.Writer

NewGUIFilterWriter 创建一个新的GUI过滤写入器

func SetLevel

func SetLevel(level logrus.Level)

Types

type GUIFilterWriter

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

GUIFilterWriter 过滤编译输出,只显示重要信息给GUI用户

func (*GUIFilterWriter) Write

func (w *GUIFilterWriter) Write(p []byte) (int, error)

type ILogger

type ILogger interface {
	Tracef(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
	Panicf(format string, args ...interface{})
	Trace(args ...interface{})
	Debug(args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Fatal(args ...interface{})
	Panic(args ...interface{})
}

func GetLogger

func GetLogger(ctx context.Context) ILogger

type NotifyBuffer

type NotifyBuffer struct {
	Updated chan struct{}
	// contains filtered or unexported fields
}

func NewNotifyBuffer

func NewNotifyBuffer() *NotifyBuffer

func (*NotifyBuffer) Close

func (b *NotifyBuffer) Close()

func (*NotifyBuffer) Read

func (b *NotifyBuffer) Read() string

func (*NotifyBuffer) Write

func (b *NotifyBuffer) Write(p []byte) (int, error)

type PlainFormatter

type PlainFormatter struct{}

func (*PlainFormatter) Format

func (f *PlainFormatter) Format(entry *logrus.Entry) ([]byte, error)

Source Files

  • gui_filter.go
  • log.go
  • notify_writer.go
  • plain_formatter.go

Jump to

Keyboard shortcuts

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