flog

package module
v0.0.0-...-017435c Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package flog provides slog helpers shared by various FerretDB projects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsoleHandler

func NewConsoleHandler(out io.Writer, opts *NewConsoleHandlerOpts) *consoleHandler

NewConsoleHandler creates a new console handler.

If out is a valid tty, the consoleHandler will send colorized messages. If NO_COLOR environment variable is set colorized messages are disabled.

Types

type NewConsoleHandlerOpts

type NewConsoleHandlerOpts struct {
	Level        slog.Leveler
	RemoveTime   bool
	RemoveLevel  bool
	RemoveSource bool
}

NewConsoleHandlerOpts represents NewConsoleHandler options.

Jump to

Keyboard shortcuts

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