logger

package
v0.0.0-...-35a45e1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Copyright 2019 LinkinStar

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

Debug log

func Debugf

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

Debugf log

func Error

func Error(v ...interface{})

Error log

func Errorf

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

Errorf log

func Info

func Info(v ...interface{})

Info log

func Infof

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

Infof log

func InitLogger

func InitLogger(level, projectName, logPath string, maxAge, rotationTime time.Duration)

InitLogger 初始化日志Logger

func Warn

func Warn(v ...interface{})

Warn log

func Warnf

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

Warnf log

Types

type ILogger

type ILogger interface {
	Debug(v ...interface{})
	Debugf(format string, v ...interface{})

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

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

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

ILogger 定义日志接口,如果后续需要替换日志框架只需要实现接口,替换实现即可

Jump to

Keyboard shortcuts

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