log

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const NoticeLevel zapcore.Level = zapcore.DebugLevel - 1

Variables

This section is empty.

Functions

func NewLogglyZapCore added in v1.2.0

func NewLogglyZapCore(w *LogglyLogWriter) zapcore.Core

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func (*Logger) Error

func (l *Logger) Error(msg string, err error, fields ...zapcore.Field)

func (*Logger) Flush

func (l *Logger) Flush()

func (*Logger) Info

func (l *Logger) Info(msg string, fields ...zapcore.Field)

func (*Logger) Warning

func (l *Logger) Warning(msg string, fields ...zapcore.Field)

type LoggerDependency

type LoggerDependency struct {
	Zap *zap.Logger
}

type LoggerInterface

type LoggerInterface interface {
	Info(string, ...zapcore.Field)
	Error(string, error, ...zapcore.Field)
	Warning(string, ...zapcore.Field)
	Flush()
}

func BuildNewLogger

func BuildNewLogger(cores ...zapcore.Core) LoggerInterface

func NewLogger

func NewLogger(ld *LoggerDependency) LoggerInterface

type LogglyLogWriter added in v1.2.0

type LogglyLogWriter struct {
	HttpClient *http.Client
	Url        string
}

func NewLogglyLogWriter added in v1.2.0

func NewLogglyLogWriter(d LogglyLogWriterDependency) *LogglyLogWriter

func (*LogglyLogWriter) Write added in v1.2.0

func (j *LogglyLogWriter) Write(p []byte) (n int, err error)

type LogglyLogWriterDependency added in v1.2.0

type LogglyLogWriterDependency struct {
	HttpClient    *http.Client
	BaseUrl       string
	CustomerToken string
	Tag           string
}

Jump to

Keyboard shortcuts

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