logutil

package
v0.0.0-...-94dd193 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 5 Imported by: 4

Documentation

Overview

Package logutil has utilities for working with the Go Kit log package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal

func Fatal(logger log.Logger, args ...interface{})

Fatal logs a error message and exits the process.

func NewCLILogger

func NewCLILogger(debug bool) log.Logger

NewCLILogger creates a standard logger for Kolide CLI tools. The logger will output leveled logs with a "severity" field set to either "info" or "debug". The acceptable level can be swapped by sending SIGUSR2 to the process.

func NewServerLogger

func NewServerLogger(debug bool) log.Logger

NewServerLogger creates a standard logger for Kolide services. The logger will output JSON structured logs with a "severity" field set to either "info" or "debug". The acceptable level can be swapped by sending SIGUSR2 to the process.

func SetLevelKey

func SetLevelKey(logger log.Logger, key interface{}) log.Logger

SetLevelKey changes the "level" key in a Go Kit logger, allowing the user to set it to something else. Useful for deploying services to GCP, as stackdriver expects a "severity" key instead.

see https://github.com/go-kit/kit/issues/503

Types

This section is empty.

Jump to

Keyboard shortcuts

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