logger

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: Apache-2.0 Imports: 0 Imported by: 5

README

HAProxy

Go Logger

Description

Go Logger is an interface for logging in Go programing language. Beside interface it also provides option to create a logger that can log to multiple destinations

Using multiple loggers at the same time
import (
  ...
  logger "github.com/haproxytech/go-logger"
  ...
)

log1 := // create log1
log2 := // create log2

log := logger.New(log1, log2)

log.Print("Printing to two different loggers")
Contributing

Thanks for your interest in the project and your willing to contribute:

Discussion

A Github issue is the right place to discuss feature requests, bug reports or any other subject that needs tracking.

To ask questions, get some help or even have a little chat, you can join our #ingress-controller channel in HAProxy Community Slack.

License

Apache License 2.0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format interface {
	Printf(format string, args ...interface{})
	Tracef(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warningf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Panicf(format string, args ...interface{})
}

type Logger

type Logger interface {
	Std
	Format
}

func New

func New(logger ...Logger) Logger

type Std

type Std interface {
	Print(args ...interface{})
	Trace(args ...interface{})
	Debug(args ...interface{})
	Info(args ...interface{})
	Warning(args ...interface{})
	Error(args ...interface{})
	Panic(args ...interface{})
}

Jump to

Keyboard shortcuts

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