logger

package module
v0.0.0-...-216a86d Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

logger

logger wrapper

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, keysAndValues ...interface{})

func DebugSkipOne

func DebugSkipOne(msg string, keysAndValues ...interface{})

func Error

func Error(msg string, keysAndValues ...interface{})

func ErrorSkipOne

func ErrorSkipOne(msg string, keysAndValues ...interface{})

func Fatal

func Fatal(msg string, keysAndValues ...interface{})

func Info

func Info(msg string, keysAndValues ...interface{})

func InfoSkipOne

func InfoSkipOne(msg string, keysAndValues ...interface{})

func RegisterWriter

func RegisterWriter(w io.Writer) func()

RegisterWriter adds w as a log subscriber. Every log line written by the logger will be copied to w as JSON. The returned function removes the subscription when called.

func SetLogToDisk

func SetLogToDisk(filename string)

func SetNamespace

func SetNamespace(namespace, subsystem string)

SetNamespace sets the namespace and subsystem for the logger metrics. This should be called before any logging is done. Namespace is the first part of the metric name, and subsystem is the second. Namespace should be your application name, and subsystem should be the component of your application that is doing the logging.

func Sync

func Sync()

Types

This section is empty.

Jump to

Keyboard shortcuts

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