log

package module
v0.0.0-...-5c0a5ce Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: MIT Imports: 6 Imported by: 4

README

log

Build Status Build status Go Report Card

日志系统,可以根据panic精确输出是哪行代码出错,是调试的好帮手

#新增特性: 在高并发下的多线程的日志同步,方便精确定位代码问题

#使用方法

第一步先下载代码到工程环境下

第二步在线程/进程开始的调用初始化方法:fmt.Start()

第三步,在你需要调试的地方fmt.Println("输出内容")

最后,在线程/进程开始的调用初始化方法:fmt.Over()

跨平台应用进行

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(Tag string, args ...interface{})

Debug logs a message at level Debug on the standard logger.

func Debugf

func Debugf(Tag string, format string, args ...interface{})

Debugf logs a message at level Debug on the standard logger.

func Debugln

func Debugln(Tag string, args ...interface{})

Debugln logs a message at level Debug on the standard logger.

func Error

func Error(Tag string, args ...interface{})

Error logs a message at level Error on the standard logger.

func Errorf

func Errorf(Tag string, format string, args ...interface{})

Errorf logs a message at level Error on the standard logger.

func Errorln

func Errorln(Tag string, args ...interface{})

Errorln logs a message at level Error on the standard logger.

func Fatal

func Fatal(Tag string, args ...interface{})

Fatal logs a message at level Fatal on the standard logger.

func Fatalf

func Fatalf(Tag string, format string, args ...interface{})

Fatalf logs a message at level Fatal on the standard logger.

func Fatalln

func Fatalln(Tag string, args ...interface{})

Fatalln logs a message at level Fatal on the standard logger.

func Info

func Info(Tag string, args ...interface{})

Info logs a message at level Info on the standard logger.

func Infof

func Infof(Tag string, format string, args ...interface{})

Infof logs a message at level Info on the standard logger.

func Infoln

func Infoln(Tag string, args ...interface{})

Infoln logs a message at level Info on the standard logger.

func Init

func Init(debug bool)

初始化,log日志保留几天,默认不删除

func InitListner

func InitListner(str string)

监听当前线程的崩溃事件,拦截,写入日志文件

func Panic

func Panic(Tag string, args ...interface{})

Panic logs a message at level Panic on the standard logger.

func Panicf

func Panicf(Tag string, format string, args ...interface{})

Panicf logs a message at level Panic on the standard logger.

func Panicln

func Panicln(Tag string, args ...interface{})

Panicln logs a message at level Panic on the standard logger.

func Print

func Print(Tag string, args ...interface{})

Print logs a message at level Info on the standard logger.

func Printf

func Printf(Tag string, format string, args ...interface{})

Printf logs a message at level Info on the standard logger.

func Println

func Println(Tag string, args ...interface{})

Println logs a message at level Info on the standard logger.

func SetSaveDays

func SetSaveDays(days int)

func Warn

func Warn(Tag string, args ...interface{})

Warn logs a message at level Warn on the standard logger.

func Warnf

func Warnf(Tag string, format string, args ...interface{})

Warnf logs a message at level Warn on the standard logger.

func Warning

func Warning(Tag string, args ...interface{})

Warning logs a message at level Warn on the standard logger.

func Warningf

func Warningf(Tag string, format string, args ...interface{})

Warningf logs a message at level Warn on the standard logger.

func Warningln

func Warningln(Tag string, args ...interface{})

Warningln logs a message at level Warn on the standard logger.

func Warnln

func Warnln(Tag string, args ...interface{})

Warnln logs a message at level Warn on the standard logger.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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