Documentation ¶
Overview ¶
Package log provides a logging abstraction.
Index ¶
- Variables
- func DisableLoggers()
- func IsCLILoggerEnabled() bool
- func IsTraceLoggerEnabled() bool
- func SetCLILogger(log Logger)
- func SetDebugLogger(log Logger)
- func SetDefaultCLILogger()
- func SetDefaultDebugLogger()
- func SetDefaultInfoLogger()
- func SetDefaultLoggers()
- func SetDefaultOptimizeLogger()
- func SetDefaultParseLogger()
- func SetDefaultReadLogger()
- func SetDefaultStatsLogger()
- func SetDefaultTraceLogger()
- func SetDefaultValidateLogger()
- func SetDefaultWriteLogger()
- func SetInfoLogger(log Logger)
- func SetOptimizeLogger(log Logger)
- func SetParseLogger(log Logger)
- func SetReadLogger(log Logger)
- func SetStatsLogger(log Logger)
- func SetTraceLogger(log Logger)
- func SetValidateLogger(log Logger)
- func SetWriteLogger(log Logger)
- type Logger
Constants ¶
This section is empty.
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.
Functions ¶
func IsCLILoggerEnabled ¶
func IsCLILoggerEnabled() bool
IsCLILoggerEnabled returns true if the CLI Logger is enabled.
func IsTraceLoggerEnabled ¶
func IsTraceLoggerEnabled() bool
IsTraceLoggerEnabled returns true if the Trace Logger is enabled.
func SetDefaultCLILogger ¶
func SetDefaultCLILogger()
SetDefaultCLILogger sets the default cli logger.
func SetDefaultDebugLogger ¶
func SetDefaultDebugLogger()
SetDefaultDebugLogger sets the default debug logger.
func SetDefaultInfoLogger ¶
func SetDefaultInfoLogger()
SetDefaultInfoLogger sets the default info logger.
func SetDefaultLoggers ¶
func SetDefaultLoggers()
SetDefaultLoggers sets all loggers to their default logger.
func SetDefaultOptimizeLogger ¶
func SetDefaultOptimizeLogger()
SetDefaultOptimizeLogger sets the default optimize logger.
func SetDefaultParseLogger ¶
func SetDefaultParseLogger()
SetDefaultParseLogger sets the default parse logger.
func SetDefaultReadLogger ¶
func SetDefaultReadLogger()
SetDefaultReadLogger sets the default read logger.
func SetDefaultStatsLogger ¶
func SetDefaultStatsLogger()
SetDefaultStatsLogger sets the default stats logger.
func SetDefaultTraceLogger ¶
func SetDefaultTraceLogger()
SetDefaultTraceLogger sets the default trace logger.
func SetDefaultValidateLogger ¶
func SetDefaultValidateLogger()
SetDefaultValidateLogger sets the default validate logger.
func SetDefaultWriteLogger ¶
func SetDefaultWriteLogger()
SetDefaultWriteLogger sets the default write logger.
func SetOptimizeLogger ¶
func SetOptimizeLogger(log Logger)
SetOptimizeLogger sets the optimize logger.
func SetValidateLogger ¶
func SetValidateLogger(log Logger)
SetValidateLogger sets the validate logger.
Types ¶
type Logger ¶
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.