feat: console help, examples and named loggers (SummerCMS v0.4.0)
Every command gets long help and examples, descriptions in imperative sentence case, and a warn-only TestCommandsDocumented over bonfire.CheckDocs. The plugin logs through a diary component logger instead of the process default logger. Requires SummerCMS v0.4.0; command names and flags unchanged.
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"embed"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -72,7 +71,7 @@ func (p *Plugin) wireSiteCache(app *backpack.App) error {
|
||||
return nil
|
||||
}
|
||||
cfg := app.Config
|
||||
log := slog.Default()
|
||||
log := pluginLog
|
||||
aliasURL := cfg.String(classes.SiteCachePurgeURLKey)
|
||||
aliasToken := cfg.String(classes.SiteCachePurgeTokenKey)
|
||||
aliasSet := strings.TrimSpace(aliasURL) != "" || aliasToken != ""
|
||||
|
||||
Reference in New Issue
Block a user