log

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package log 输出的日志管理

Index

Constants

View Source
const (
	Success int8 = iota
	Info
	Warn
	Error
	Ignore
)

日志类型

Variables

This section is empty.

Functions

func AsWriter added in v1.0.0

func AsWriter(t int8, w chan<- *Log) io.Writer

func TestLogs added in v1.0.0

func TestLogs(t *testing.T)

Types

type Console

type Console struct {
	Logs chan *Log
	// contains filtered or unexported fields
}

Console 将日志输出到控制台

func NewConsole

func NewConsole(showIgnore bool) *Console

NewConsole 声明 ConsoleLogs 实例

func (*Console) Stop

func (logs *Console) Stop()

Stop 停止输出

type Log

type Log struct {
	Type    int8
	Message string
}

Jump to

Keyboard shortcuts

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