log

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStdLogger

func NewStdLogger(out, err io.Writer) cloudsql.Logger

NewStdLogger create a Logger that uses out and err for informational and error messages.

func NewStructuredLogger

func NewStructuredLogger(quiet bool) (cloudsql.Logger, func() error)

NewStructuredLogger creates a Logger that logs messages using JSON.

Types

type StdLogger

type StdLogger struct {
	// contains filtered or unexported fields
}

StdLogger is the standard logger that distinguishes between info and error logs.

func (*StdLogger) Debugf

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

Debugf logs debug messages

func (*StdLogger) Errorf

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

Errorf logs error messages

func (*StdLogger) Infof

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

Infof logs informational messages

type StructuredLogger

type StructuredLogger struct {
	// contains filtered or unexported fields
}

StructuredLogger writes log messages in JSON.

func (*StructuredLogger) Debugf

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

Debugf logs debug messages

func (*StructuredLogger) Errorf

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

Errorf logs error messages

func (*StructuredLogger) Infof

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

Infof logs informational messages

Jump to

Keyboard shortcuts

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