flogger

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Package flogger stands for Fire Logger; keep your naughty thoughts to yourself.

Index

Constants

This section is empty.

Variables

View Source
var ContextKey = contextKeyType{}
View Source
var DefaultContext = panicOutput{}

Functions

func Append added in v0.3.0

func Append(buf []byte, attrs ...slog.Attr) []byte

func Format added in v0.3.0

func Format(msg string, attrs ...slog.Attr) string

func Log

func Log(lc Context, message string, args ...any)

func Logx added in v0.3.0

func Logx(lc Context, level slog.Level, message string, args ...slog.Attr)

Types

type Context

type Context interface {
	Logf(format string, args ...any)
	AppendLogPrefix(buf *bytes.Buffer)
	AppendLogSuffix(buf *bytes.Buffer)
}

func ContextFrom added in v0.3.0

func ContextFrom(ctx context.Context) Context

func Prefix

func Prefix(parent Context, prefix string) Context

func ToFunc

func ToFunc(f func(format string, args ...any)) Context

Jump to

Keyboard shortcuts

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