ljwriter

package
v0.0.0-...-26d813d Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int

A Level is a logging priority. Higher levels are more important.

const (
	// DebugLevel logs are typically voluminous, and are usually disabled in
	// production.
	DebugLevel Level = iota
	// InfoLevel is the default logging priority.
	InfoLevel
	// WarnLevel logs are more important than Info, but don't need individual
	// human review.
	WarnLevel
	// ErrorLevel logs are high-priority. If an application is running smoothly,
	// it shouldn't generate any error-level logs.
	ErrorLevel
	// DPanicLevel logs are particularly important errors. In development the
	// logger panics after writing the message.
	DPanicLevel
	// PanicLevel logs a message, then panics.
	PanicLevel
	// FatalLevel logs a message, then calls os.Exit(1).
	FatalLevel

	// InvalidLevel is an invalid value for Level.
	//
	// Core implementations may panic if they see messages of this level.
	InvalidLevel = _maxLevel + 1
)

type Writer

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

func New

func New(config *nlog.LogConfig) (*Writer, error)

New creates a new writer with config.

func (*Writer) Debug

func (w *Writer) Debug(args ...interface{})

func (*Writer) Debugf

func (w *Writer) Debugf(format string, args ...interface{})

func (*Writer) Error

func (w *Writer) Error(args ...interface{})

func (*Writer) Errorf

func (w *Writer) Errorf(format string, args ...interface{})

func (*Writer) Fatal

func (w *Writer) Fatal(args ...interface{})

func (*Writer) Fatalf

func (w *Writer) Fatalf(format string, args ...interface{})

func (*Writer) Info

func (w *Writer) Info(args ...interface{})

func (*Writer) Infof

func (w *Writer) Infof(format string, args ...interface{})

func (*Writer) Sync

func (w *Writer) Sync() error

func (*Writer) Warn

func (w *Writer) Warn(args ...interface{})

func (*Writer) Warnf

func (w *Writer) Warnf(format string, args ...interface{})

func (*Writer) Write

func (w *Writer) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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