mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
09188981c4
* tls: Add support for the tls-alpn-01 challenge Also updates lego/acme to latest on master. TODO: This implementation of the tls-alpn challenge is not yet solvable in a distributed Caddy cluster like the http challenge is. * build: Allow building with the race detector * tls: Support distributed solving of the TLS-ALPN-01 challenge * Update vendor and add a todo in MITM checker
49 lines
1.2 KiB
Go
49 lines
1.2 KiB
Go
package log
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
)
|
|
|
|
// Logger is an optional custom logger.
|
|
var Logger = log.New(os.Stdout, "", log.LstdFlags)
|
|
|
|
// Fatal writes a log entry.
|
|
// It uses Logger if not nil, otherwise it uses the default log.Logger.
|
|
func Fatal(args ...interface{}) {
|
|
Logger.Fatal(args...)
|
|
}
|
|
|
|
// Fatalf writes a log entry.
|
|
// It uses Logger if not nil, otherwise it uses the default log.Logger.
|
|
func Fatalf(format string, args ...interface{}) {
|
|
Logger.Fatalf(format, args...)
|
|
}
|
|
|
|
// Print writes a log entry.
|
|
// It uses Logger if not nil, otherwise it uses the default log.Logger.
|
|
func Print(args ...interface{}) {
|
|
Logger.Print(args...)
|
|
}
|
|
|
|
// Println writes a log entry.
|
|
// It uses Logger if not nil, otherwise it uses the default log.Logger.
|
|
func Println(args ...interface{}) {
|
|
Logger.Println(args...)
|
|
}
|
|
|
|
// Printf writes a log entry.
|
|
// It uses Logger if not nil, otherwise it uses the default log.Logger.
|
|
func Printf(format string, args ...interface{}) {
|
|
Logger.Printf(format, args...)
|
|
}
|
|
|
|
// Warnf writes a log entry.
|
|
func Warnf(format string, args ...interface{}) {
|
|
Printf("[WARN] "+format, args...)
|
|
}
|
|
|
|
// Infof writes a log entry.
|
|
func Infof(format string, args ...interface{}) {
|
|
Printf("[INFO] "+format, args...)
|
|
}
|