package logging
import "github.com/GoogleCloudPlatform/cloudsql-proxy/logging"
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 ¶
- Variables
- func DisableLogging()
- func EnableStructuredLogs(logDebugStdout, verbose bool) (func(), error)
- func LogDebugToStdout()
- func LogVerboseToNowhere()
Variables ¶
Errorf is called to write an error log, such as when a new connection fails.
Infof is called to write informational logs, such as when startup has
Verbosef is called to write verbose logs, such as when a new connection is established correctly.
Functions ¶
func DisableLogging ¶
func DisableLogging()
DisableLogging sets all logging levels to no-op's.
func EnableStructuredLogs ¶
EnableStructuredLogs replaces all logging functions with structured logging variants.
func LogDebugToStdout ¶
func LogDebugToStdout()
LogDebugToStdout updates Verbosef and Info logging to use stdout instead of stderr.
func LogVerboseToNowhere ¶
func LogVerboseToNowhere()
LogVerboseToNowhere updates Verbosef so verbose log messages are discarded
Source Files ¶
- Version
- v1.37.7 (latest)
- Published
- Apr 16, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 2 months ago –
Tools for package owners.