debug

package
v1.3.23 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpStack

func DumpStack(all bool, logname string, desc string)

DumpStack used to dump stack info to file all: true means dumping all running goroutine stack, else only dumping the one that calls the func logname: prefix of the file's name, which is like logname.20060102-150405 msg: description message

func SigNotifyStack

func SigNotifyStack(sig os.Signal, all bool, logname string)

SigNotifyStack register os signals to be notified when to dumpstack For example, SigNotifyStack(SIGUSR1, true, "stackinfo"), can dump all goroutine stack when received SIGUSR1 signal by "kill -USR1 pid" sig: self defined os signals, like SIGUSR1 SIGUSR2 in linux and darwin but not supoorted in windows all: true means dumping all running goroutine stack, else only dumping the one that calls the func logname: prefix of the file's name, which is like logname.20060102-150405

Types

This section is empty.

Jump to

Keyboard shortcuts

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