logging

package
v0.1.88 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package logging wires zerolog. Logs always go to stderr so that a command's actual output on stdout stays machine-readable — `shrike doctor --json | jq` must not have log lines spliced into it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(level string, jsonFormat bool)

Init configures the global logger. jsonFormat selects structured output for production log shipping; otherwise we use the human console writer.

Types

type ThirdParty

type ThirdParty struct{}

ThirdParty adapts libraries that insist on their own logger (go-redis, for one) onto zerolog at debug level. Without it, go-redis writes connection-pool retry chatter straight to stderr with its own timestamps, which corrupts both our log format and any command's human-facing output.

The method set is chosen to satisfy redis.Logging structurally, so this package needs no dependency on the client libraries it tames.

func (ThirdParty) Printf

func (ThirdParty) Printf(_ context.Context, format string, v ...any)

Jump to

Keyboard shortcuts

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