log

package
v0.0.0-...-0b63ca9 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package log 是 SDK 的 logger 接口定义与内置的 logger。

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogger = Logger(new(consoleLogger))

DefaultLogger 默认logger

Functions

func Debug

func Debug(v ...interface{})

Debug log.Debug

func Debugf

func Debugf(format string, v ...interface{})

Debugf log.Debugf

func Error

func Error(v ...interface{})

Error log.Error

func Errorf

func Errorf(format string, v ...interface{})

Errorf log.Errorf

func Info

func Info(v ...interface{})

Info log.Info

func Infof

func Infof(format string, v ...interface{})

Infof log.Infof

func Sync

func Sync()

Sync logger Sync calls to flush buffer

func Warn

func Warn(v ...interface{})

Warn log.Warn

func Warnf

func Warnf(format string, v ...interface{})

Warnf log.Warnf

Types

type Logger

type Logger interface {
	Debug(v ...interface{})
	Info(v ...interface{})
	Warn(v ...interface{})
	Error(v ...interface{})

	Debugf(format string, v ...interface{})
	Infof(format string, v ...interface{})
	Warnf(format string, v ...interface{})
	Errorf(format string, v ...interface{})
	// Sync logger Sync calls to flush buffer
	Sync() error
}

Logger 日志需要实现的接口定义

Jump to

Keyboard shortcuts

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