v0.32.0 lwconf engine update: config by path, schema from code, wasm

This commit is contained in:
lixen committed 2026-10-10 18:28:01 -04:00
1 parent c2e3d669da
commit a1e9d21d06
33 files changed
+1278 -421

No files matched your search

+6 -1
View File
@@ -8,6 +8,7 @@ import (
"os"
"os/signal"
"reflect"
"strings"
"syscall"
"github.com/lixenwraith/logwisp/internal/compose"
@@ -147,7 +148,7 @@ func main() {
next, err = manager.Snapshot()
}
if err != nil {
logger.Error("msg", "Failed to read reload configuration", "error", err, "action", "keeping current service")
logger.Error("msg", "Failed to read reload configuration", "error", oneLine(err), "action", "keeping current service")
return
}
// Watch events are hints and may be duplicated or concern startup-only
@@ -219,6 +220,10 @@ func readsStdin(cfg *config.Config) bool {
return false
}
// oneLine is an error for a log record, which is a line: the problems
// validation joins, "; " between them
func oneLine(err error) string { return strings.ReplaceAll(err.Error(), "\n", "; ") }
// loadFailed reports a configuration that did not load and returns lw's exit
// code: a named file that is missing is a usage error
func loadFailed(err error) int {