Documentation ¶
Overview ¶
Package log provides a logging abstraction.
Index ¶
- Variables
- func CLIEnabled() bool
- func DebugEnabled() bool
- func DisableLoggers()
- func InfoEnabled() bool
- func OptimizeEnabled() bool
- func ParseEnabled() bool
- func ReadEnabled() 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)
- func StatsEnabled() bool
- func TraceEnabled() bool
- func ValidateEnabled() bool
- func WriteEnabled() bool
- 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 CLIEnabled ¶ added in v0.8.0
func CLIEnabled() bool
CLIEnabled returns true if the CLI Logger is enabled.
func DebugEnabled ¶ added in v0.8.0
func DebugEnabled() bool
DebugEnabled returns true if the Debug Logger is enabled.
func InfoEnabled ¶ added in v0.8.0
func InfoEnabled() bool
InfoEnabled returns true if the Info Logger is enabled.
func OptimizeEnabled ¶ added in v0.8.0
func OptimizeEnabled() bool
OptimizeEnabled returns true if the Optimize Logger is enabled.
func ParseEnabled ¶ added in v0.8.0
func ParseEnabled() bool
ParseEnabled returns true if the Parse Logger is enabled.
func ReadEnabled ¶ added in v0.8.0
func ReadEnabled() bool
ReadEnabled returns true if the Read Logger is enabled.
func SetDefaultCLILogger ¶ added in v0.8.0
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 ¶ added in v0.1.18
func SetDefaultOptimizeLogger()
SetDefaultOptimizeLogger sets the default optimize logger.
func SetDefaultParseLogger ¶ added in v0.1.18
func SetDefaultParseLogger()
SetDefaultParseLogger sets the default parse logger.
func SetDefaultReadLogger ¶ added in v0.1.18
func SetDefaultReadLogger()
SetDefaultReadLogger sets the default read logger.
func SetDefaultStatsLogger ¶
func SetDefaultStatsLogger()
SetDefaultStatsLogger sets the default stats logger.
func SetDefaultTraceLogger ¶ added in v0.1.18
func SetDefaultTraceLogger()
SetDefaultTraceLogger sets the default trace logger.
func SetDefaultValidateLogger ¶ added in v0.1.18
func SetDefaultValidateLogger()
SetDefaultValidateLogger sets the default validate logger.
func SetDefaultWriteLogger ¶ added in v0.1.18
func SetDefaultWriteLogger()
SetDefaultWriteLogger sets the default write logger.
func SetOptimizeLogger ¶ added in v0.1.18
func SetOptimizeLogger(log Logger)
SetOptimizeLogger sets the optimize logger.
func SetParseLogger ¶ added in v0.1.18
func SetParseLogger(log Logger)
SetParseLogger sets the parse logger.
func SetReadLogger ¶ added in v0.1.18
func SetReadLogger(log Logger)
SetReadLogger sets the read logger.
func SetTraceLogger ¶ added in v0.1.18
func SetTraceLogger(log Logger)
SetTraceLogger sets the trace logger.
func SetValidateLogger ¶ added in v0.1.18
func SetValidateLogger(log Logger)
SetValidateLogger sets the validate logger.
func SetWriteLogger ¶ added in v0.1.18
func SetWriteLogger(log Logger)
SetWriteLogger sets the write logger.
func StatsEnabled ¶ added in v0.8.0
func StatsEnabled() bool
StatsEnabled returns true if the Read Logger is enabled.
func TraceEnabled ¶ added in v0.8.0
func TraceEnabled() bool
TraceEnabled returns true if the Trace Logger is enabled.
func ValidateEnabled ¶ added in v0.8.0
func ValidateEnabled() bool
ValidateEnabled returns true if the Validate Logger is enabled.
func WriteEnabled ¶ added in v0.8.0
func WriteEnabled() bool
WriteEnabled returns true if the Write Logger is enabled.
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.