pdfcpu: github.com/pdfcpu/pdfcpu/pkg/log Index | Files

package log

import "github.com/pdfcpu/pdfcpu/pkg/log"

Package log provides a logging abstraction.

Index

Package Files

log.go

Variables

var (

    // Horizontal loggers
    Debug = &logger{}
    Info  = &logger{}
    Stats = &logger{}
    Trace = &logger{}

    // Vertical loggers
    Parse    = &logger{}
    Read     = &logger{}
    Validate = &logger{}
    Optimize = &logger{}
    Write    = &logger{}
    CLI      = &logger{}
)

pdfcpu's loggers.

func DisableLoggers Uses

func DisableLoggers()

DisableLoggers turns off all logging.

func IsCLILoggerEnabled Uses

func IsCLILoggerEnabled() bool

IsCLILoggerEnabled returns true if the CLI Logger is enabled.

func IsTraceLoggerEnabled Uses

func IsTraceLoggerEnabled() bool

IsTraceLoggerEnabled returns true if the Trace Logger is enabled.

func SetCLILogger Uses

func SetCLILogger(log Logger)

SetCLILogger sets the api logger.

func SetDebugLogger Uses

func SetDebugLogger(log Logger)

SetDebugLogger sets the debug logger.

func SetDefaultCLILogger Uses

func SetDefaultCLILogger()

SetDefaultCLILogger sets the default cli logger.

func SetDefaultDebugLogger Uses

func SetDefaultDebugLogger()

SetDefaultDebugLogger sets the default debug logger.

func SetDefaultInfoLogger Uses

func SetDefaultInfoLogger()

SetDefaultInfoLogger sets the default info logger.

func SetDefaultLoggers Uses

func SetDefaultLoggers()

SetDefaultLoggers sets all loggers to their default logger.

func SetDefaultOptimizeLogger Uses

func SetDefaultOptimizeLogger()

SetDefaultOptimizeLogger sets the default optimize logger.

func SetDefaultParseLogger Uses

func SetDefaultParseLogger()

SetDefaultParseLogger sets the default parse logger.

func SetDefaultReadLogger Uses

func SetDefaultReadLogger()

SetDefaultReadLogger sets the default read logger.

func SetDefaultStatsLogger Uses

func SetDefaultStatsLogger()

SetDefaultStatsLogger sets the default stats logger.

func SetDefaultTraceLogger Uses

func SetDefaultTraceLogger()

SetDefaultTraceLogger sets the default trace logger.

func SetDefaultValidateLogger Uses

func SetDefaultValidateLogger()

SetDefaultValidateLogger sets the default validate logger.

func SetDefaultWriteLogger Uses

func SetDefaultWriteLogger()

SetDefaultWriteLogger sets the default write logger.

func SetInfoLogger Uses

func SetInfoLogger(log Logger)

SetInfoLogger sets the info logger.

func SetOptimizeLogger Uses

func SetOptimizeLogger(log Logger)

SetOptimizeLogger sets the optimize logger.

func SetParseLogger Uses

func SetParseLogger(log Logger)

SetParseLogger sets the parse logger.

func SetReadLogger Uses

func SetReadLogger(log Logger)

SetReadLogger sets the read logger.

func SetStatsLogger Uses

func SetStatsLogger(log Logger)

SetStatsLogger sets the stats logger.

func SetTraceLogger Uses

func SetTraceLogger(log Logger)

SetTraceLogger sets the trace logger.

func SetValidateLogger Uses

func SetValidateLogger(log Logger)

SetValidateLogger sets the validate logger.

func SetWriteLogger Uses

func SetWriteLogger(log Logger)

SetWriteLogger sets the write logger.

type Logger Uses

type Logger interface {

    // Printf logs a formatted string.
    Printf(format string, args ...interface{})

    // Println logs a line.
    Println(args ...interface{})

    // Fatalf is equivalent to Printf() followed by a program abort.
    Fatalf(format string, args ...interface{})

    // Fatalln is equivalent to Println() followed by a progam abort.
    Fatalln(args ...interface{})
}

Logger defines an interface for logging messages.

Package log imports 2 packages (graph) and is imported by 9 packages. Updated 2020-02-17. Refresh now. Tools for package owners.