feat: implement legacy operation logging

This commit is contained in:
OpenClaw Agent
2026-09-21 16:05:06 +08:00
parent add2a22416
commit 4cf4e92932
3 changed files with 72 additions and 1 deletions
+2 -1
View File
@@ -11,6 +11,7 @@ import (
"chfs-ng/internal/api"
"chfs-ng/internal/auth"
"chfs-ng/internal/config"
"chfs-ng/internal/opslog"
"chfs-ng/internal/storage"
)
@@ -67,7 +68,7 @@ func main() {
if len(cfg.Path) == 1 {
store = storage.Local{Root: root}
}
srv := &api.Server{Store: store, Auth: mgr, Sessions: map[string]*auth.Account{}, WebDAVRoot: root, Allow: cfg.Allow, MultiRoot: len(cfg.Path) > 1, RemoveMode: cfg.FileRemove}
srv := &api.Server{Store: store, Auth: mgr, Sessions: map[string]*auth.Account{}, WebDAVRoot: root, Allow: cfg.Allow, MultiRoot: len(cfg.Path) > 1, RemoveMode: cfg.FileRemove, Log: opslog.New(cfg.Log)}
addr := ":" + itoa(cfg.Port)
log.Printf("chfs-ng listening on %s root=%s removeMode=%d", addr, filepath.Clean(root), cfg.FileRemove)
if cfg.SSLCert != "" && cfg.SSLKey != "" {