log

package
v0.0.0-...-2b7f6e1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug logs at the lowest level

func Debugw

func Debugw(msg string, args ...interface{})

Debugw logs structured logs at the lowest level

func Error

func Error(args ...interface{})

Error logs at the level which requires attention

func Errorw

func Errorw(msg string, args ...interface{})

Errorw logs structured logs at the level which requires attention

func Fatal

func Fatal(args ...interface{})

Fatal logs a message and stops the process

func Fatalw

func Fatalw(msg string, args ...interface{})

Fatalw logs a structured log and stops the process

func Info

func Info(args ...interface{})

Info logs messages which are helpful for tracking problems

func Infow

func Infow(msg string, args ...interface{})

Infow logs structured logs which are helpful for tracking problems

func Panic

func Panic(args ...interface{})

Panic logs critical messages and stops the process

func Panicw

func Panicw(msg string, args ...interface{})

Panicw logs structured logs and stops the process

func Start

func Start(ctx context.Context, c *Configuration)

Start is called very early by the startup routine to configure logging

func Warn

func Warn(args ...interface{})

Warn logs unusual situations

func Warnw

func Warnw(msg string, args ...interface{})

Warnw logs strucutured logs for unusual situations

Types

type Configuration

type Configuration struct {
	Console            bool
	ConsoleLevel       zapcore.Level
	GoogleCloudProject string
	GoogleCloudCreds   string
	FilePath           string
	FileLevel          zapcore.Level
}

Configuration is the primary config for logging

type Printer

type Printer bool

Printer is a type to satisfy tgbotapi's logger

func (Printer) Printf

func (p Printer) Printf(v string, args ...interface{})

Printf logs a formatted message

func (Printer) Println

func (p Printer) Println(args ...interface{})

Println logs a simple message

Jump to

Keyboard shortcuts

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