log

package
v2.0.0-preview.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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() (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{})

func (*StdLogger) Errorf

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

func (*StdLogger) Infof

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

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{})

func (*StructuredLogger) Errorf

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

func (*StructuredLogger) Infof

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

Jump to

Keyboard shortcuts

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