logext

package
v8.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

Package logext provides a custom logger that logs messages to the provided output.

Logging is controlled by the GMT_DEBUG environment variable; set to "true" to enable debug logging.

Index

Constants

View Source
const DebugEnvVar = "GMT_DEBUG"

DebugEnvVar is the name of the environment variable that controls debug logging.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*log.Logger
}

Logger is a custom logger that logs messages to the provided output.

func Default

func Default() *Logger

Default returns the default logger.

func New

func New(output io.Writer) *Logger

New returns a new logger. If the GMT_DEBUG environment variable is set, it logs messages to the provided output. Otherwise, it discards all log messages.

Jump to

Keyboard shortcuts

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