logflags

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 12 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any added in v1.5.1

func Any() bool

Any returns true if any logging is enabled.

func Close added in v1.3.0

func Close()

Close closes the logger output.

func DAP added in v1.4.1

func DAP() bool

DAP returns true if dap package should log.

func DebugLineErrors

func DebugLineErrors() bool

DebugLineErrors returns true if pkg/dwarf/line should log its recoverable errors.

func Debugger

func Debugger() bool

Debugger returns true if the debugger package should log.

func DefaultFormatter added in v1.20.2

func DefaultFormatter() logrus.Formatter

DefaultFormatter provides a simplified version of logrus.TextFormatter that doesn't make logs unreadable when they are output to a text file or to a terminal that doesn't support colors.

func FnCall

func FnCall() bool

FnCall returns true if the function call protocol should be logged.

func GdbWire

func GdbWire() bool

GdbWire returns true if the gdbserial package should log all the packets exchanged with the stub.

func LLDBServerOutput

func LLDBServerOutput() bool

LLDBServerOutput returns true if the output of the LLDB server should be redirected to standard output instead of suppressed.

func Minidump added in v1.2.0

func Minidump() bool

Minidump returns true if the minidump loader should be logged.

func RPC

func RPC() bool

RPC returns true if RPC messages should be logged.

func SetLoggerFactory added in v1.20.2

func SetLoggerFactory(lf LoggerFactory)

SetLoggerFactory will ensure that every Logger created by this package, will be now created by the given LoggerFactory. Default behavior will be a logrus based Logger instance using DefaultFormatter.

func Setup

func Setup(logFlag bool, logstr, logDest string) error

Setup sets debugger flags based on the contents of logstr. If logDest is not empty logs will be redirected to the file descriptor or file path specified by logDest.

func Stack added in v1.21.1

func Stack() bool

Stack returns true if the stacktracer should be logged.

func WriteAPIListeningMessage added in v1.3.0

func WriteAPIListeningMessage(addr net.Addr)

WriteAPIListeningMessage writes the "API server listening" message in headless mode.

func WriteDAPListeningMessage added in v1.4.1

func WriteDAPListeningMessage(addr net.Addr)

WriteDAPListeningMessage writes the "DAP server listening" message in dap mode.

func WriteError added in v1.7.3

func WriteError(msg string)

Types

type Fields added in v1.20.2

type Fields map[string]interface{}

Fields type wraps many fields for Logger

type Logger added in v1.20.2

type Logger interface {
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Errorf(format string, args ...interface{})

	Debug(args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
}

Logger represents a generic interface for logging inside of Delve codebase.

func DAPLogger added in v1.4.1

func DAPLogger() Logger

DAPLogger returns a logger for dap package.

func DebugLineLogger added in v1.20.2

func DebugLineLogger() Logger

DebugLineLogger returns a logger for the dwarf/line package.

func DebuggerLogger added in v1.3.0

func DebuggerLogger() Logger

DebuggerLogger returns a logger for the debugger package.

func FnCallLogger added in v1.3.0

func FnCallLogger() Logger

func GdbWireLogger added in v1.3.0

func GdbWireLogger() Logger

GdbWireLogger returns a configured logger for the gdbserial wire protocol.

func MinidumpLogger added in v1.3.0

func MinidumpLogger() Logger

func RPCLogger added in v1.3.0

func RPCLogger() Logger

RPCLogger returns a logger for RPC messages.

func StackLogger added in v1.21.1

func StackLogger() Logger

type LoggerFactory added in v1.20.2

type LoggerFactory func(flag bool, fields Fields, out io.Writer) Logger

LoggerFactory is used to create new Logger instances. SetLoggerFactory can be used to configure it.

The given parameters fields and out can be both be nil.

Jump to

Keyboard shortcuts

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