logging

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 12

Documentation

Overview

Package logging contains helpers to support log messages. If you are using the Cloud SQL Auth proxy as a Go library, you can override these variables to control where log messages end up.

Index

Constants

This section is empty.

Variables

View Source
var Errorf = log.Printf

Errorf is called to write an error log, such as when a new connection fails.

View Source
var Infof = log.Printf

Infof is called to write informational logs, such as when startup has

View Source
var Verbosef = log.Printf

Verbosef is called to write verbose logs, such as when a new connection is established correctly.

Functions

func DisableLogging added in v1.21.0

func DisableLogging()

DisableLogging sets all logging levels to no-op's.

func EnableStructuredLogs added in v1.21.0

func EnableStructuredLogs(logDebugStdout, verbose bool) (func(), error)

EnableStructuredLogs replaces all logging functions with structured logging variants.

func LogDebugToStdout added in v1.13.0

func LogDebugToStdout()

LogDebugToStdout updates Verbosef and Info logging to use stdout instead of stderr.

func LogVerboseToNowhere added in v1.13.0

func LogVerboseToNowhere()

LogVerboseToNowhere updates Verbosef so verbose log messages are discarded

Types

This section is empty.

Jump to

Keyboard shortcuts

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