examples

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MPL-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupLogger

func SetupLogger()

Types

type ConsoleHandler added in v0.40.0

type ConsoleHandler struct {
	// contains filtered or unexported fields
}

ConsoleHandler is slog handler that formats logs as:

caller > msg key=val key=val

If no caller attribute present, just outputs msg with attrs.

func NewConsoleHandler added in v0.40.0

func NewConsoleHandler(out io.Writer, level slog.Level) *ConsoleHandler

func (*ConsoleHandler) Enabled added in v0.40.0

func (h *ConsoleHandler) Enabled(_ context.Context, level slog.Level) bool

func (*ConsoleHandler) Handle added in v0.40.0

func (h *ConsoleHandler) Handle(_ context.Context, r slog.Record) error

func (*ConsoleHandler) WithAttrs added in v0.40.0

func (h *ConsoleHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*ConsoleHandler) WithGroup added in v0.40.0

func (h *ConsoleHandler) WithGroup(name string) slog.Handler

Directories

Path Synopsis
SPDX-License-Identifier: MPL-2.0 SPDX-FileCopyrightText: Copyright (c) 2024, Emir Aganovic
SPDX-License-Identifier: MPL-2.0 SPDX-FileCopyrightText: Copyright (c) 2024, Emir Aganovic
dtls
dtls_client command
dtls_server command
client command
server command
SPDX-License-Identifier: MPL-2.0 SPDX-FileCopyrightText: Copyright (c) 2024, Emir Aganovic
SPDX-License-Identifier: MPL-2.0 SPDX-FileCopyrightText: Copyright (c) 2024, Emir Aganovic

Jump to

Keyboard shortcuts

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