log

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, fields ...zapcore.Field)

Debug is a wrapper around the zap.L().Debug() function.

func Error

func Error(msg string, fields ...zapcore.Field)

Error is a wrapper around the zap.L().Error() function.

func Fatal

func Fatal(msg string, fields ...zapcore.Field)

Fatal is a wrapper around the zap.L().Fatal() function.

func Info

func Info(msg string, fields ...zapcore.Field)

Info is a wrapper around the zap.L().Info() function.

func Panic

func Panic(msg string, fields ...zapcore.Field)

Panic is a wrapper around the zap.L().Panic() function.

func Setup

func Setup(level, format string)

Setup our logging library. The logs can be written in console format (the console format is compatible with logfmt) or in json format. The default is console, because it is better to read during development. In a production environment you should consider to use json, so that the logs can be parsed by a logging system like Elasticsearch. Next to the log format it is also possible to configure the log leven. The accepted values are "debug", "info", "warn", "error", "fatal" and "panic". The default log level is "info".

func Warn

func Warn(msg string, fields ...zapcore.Field)

Warn is a wrapper around the zap.L().Warn() function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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