log

package
v0.0.0-...-c490dda Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: BSD-3-Clause Imports: 13 Imported by: 74

Documentation

Overview

The log package logs to an io.Writer using the same log format that CUPS uses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

func DebugJob

func DebugJob(jobID string, args ...interface{})

func DebugJobf

func DebugJobf(jobID, format string, args ...interface{})

func DebugPrinter

func DebugPrinter(printerID string, args ...interface{})

func DebugPrinterf

func DebugPrinterf(printerID, format string, args ...interface{})

func Debugf

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

func Error

func Error(args ...interface{})

func ErrorJob

func ErrorJob(jobID string, args ...interface{})

func ErrorJobf

func ErrorJobf(jobID, format string, args ...interface{})

func ErrorPrinter

func ErrorPrinter(printerID string, args ...interface{})

func ErrorPrinterf

func ErrorPrinterf(printerID, format string, args ...interface{})

func Errorf

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

func Fatal

func Fatal(args ...interface{})

func FatalJob

func FatalJob(jobID string, args ...interface{})

func FatalJobf

func FatalJobf(jobID, format string, args ...interface{})

func FatalPrinter

func FatalPrinter(printerID string, args ...interface{})

func FatalPrinterf

func FatalPrinterf(printerID, format string, args ...interface{})

func Fatalf

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

func Info

func Info(args ...interface{})

func InfoJob

func InfoJob(jobID string, args ...interface{})

func InfoJobf

func InfoJobf(jobID, format string, args ...interface{})

func InfoPrinter

func InfoPrinter(printerID string, args ...interface{})

func InfoPrinterf

func InfoPrinterf(printerID, format string, args ...interface{})

func Infof

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

func SetJournalEnabled

func SetJournalEnabled(b bool)

SetJournalEnabled enables or disables writing to the systemd journal. Default is false.

func SetLevel

func SetLevel(l LogLevel)

SetLevel sets the minimum severity level to log. Default is INFO.

func SetWriter

func SetWriter(w io.Writer)

SetWriter sets the io.Writer to log to. Default is os.Stderr.

func Warning

func Warning(args ...interface{})

func WarningJob

func WarningJob(jobID string, args ...interface{})

func WarningJobf

func WarningJobf(jobID, format string, args ...interface{})

func WarningPrinter

func WarningPrinter(printerID string, args ...interface{})

func WarningPrinterf

func WarningPrinterf(printerID, format string, args ...interface{})

func Warningf

func Warningf(format string, args ...interface{})

Types

type LogLevel

type LogLevel uint8

LogLevel represents a subset of the severity levels named by CUPS.

const (
	FATAL LogLevel = iota
	ERROR
	WARNING
	INFO
	DEBUG
)

func LevelFromString

func LevelFromString(level string) (LogLevel, bool)

type LogRoller

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

func NewLogRoller

func NewLogRoller(fileName string, fileMaxBytes, maxFiles uint) (*LogRoller, error)

func (*LogRoller) Write

func (lr *LogRoller) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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