mirror of
https://github.com/vxcontrol/rancher-letsencrypt.git
synced 2026-07-01 00:08:01 -04:00
Enable ACME library logs
This commit is contained in:
+1
-1
@@ -134,11 +134,11 @@ func (c *Context) InitContext() {
|
||||
}
|
||||
|
||||
logrus.Infof("Using Let's Encrypt %s API", apiVersion)
|
||||
c.Acme.EnableLogs()
|
||||
|
||||
// Enable debug mode
|
||||
if c.Debug {
|
||||
logrus.SetLevel(logrus.DebugLevel)
|
||||
c.Acme.EnableDebug()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -149,9 +149,11 @@ func NewClient(email string, kt KeyType, apiVer ApiVersion, dnsResolvers []strin
|
||||
}, nil
|
||||
}
|
||||
|
||||
// EnableDebugLogging enables logging in the upstream lego library
|
||||
func (c *Client) EnableDebug() {
|
||||
lego.Logger = log.New(os.Stdout, "", 0)
|
||||
// EnableLogs prints logs from the upstream lego library
|
||||
func (c *Client) EnableLogs() {
|
||||
logger := logrus.New()
|
||||
logger.Out = os.Stdout
|
||||
lego.Logger = log.New(logger.Writer(), "", 0)
|
||||
}
|
||||
|
||||
// Issue obtains a new SAN certificate from the Lets Encrypt CA
|
||||
|
||||
@@ -19,7 +19,7 @@ var (
|
||||
func init() {
|
||||
flag.BoolVar(&debug, "debug", false, "Enable debugging")
|
||||
flag.BoolVar(&testMode, "test-mode", false, "Renew certificate every 120 seconds")
|
||||
logrus.SetFormatter(&logrus.TextFormatter{DisableTimestamp: true})
|
||||
// logrus.SetFormatter(&logrus.TextFormatter{DisableTimestamp: true})
|
||||
logrus.SetOutput(os.Stdout)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user