grecover

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package grecover catch exec panic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatchStack

func CatchStack() []byte

CatchStack 捕获指定stack信息,一般在处理panic/recover中处理 返回完整的堆栈信息和函数调用信息

func CheckPanic

func CheckPanic()

CheckPanic check panic when exit

Types

type Logger

type Logger interface {
	Println(args ...interface{})
}

Logger log interface

var (
	LogEntry   Logger = dummyLogger
	TracePanic        = false // trace panic stack
)

LogEntry log entry.

type LoggerFunc

type LoggerFunc func(msg ...interface{})

LoggerFunc is a bridge between Logger and any third party logger.

func (LoggerFunc) Println

func (f LoggerFunc) Println(args ...interface{})

Println implements Logger interface.

Jump to

Keyboard shortcuts

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