log

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

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