feat(logging): add log path configuration and implement logrotate policy

This commit is contained in:
2026-05-22 17:27:57 +08:00
parent 767f26f3c9
commit a2d1dada2c
5 changed files with 62 additions and 5 deletions
+11 -1
View File
@@ -49,7 +49,11 @@ type Config struct {
ListenPort string `json:"listenPort"`
FrpcPath string `json:"frpcPath"`
InstancePath string `json:"instancePath"`
LogsPath string `json:"logsPath"`
Debug bool `json:"debug"`
Status struct {
IsLogrotateConfigured bool `json:"isLogrotateConfigured"`
} `json:"status"`
Watchdog struct {
Enabled bool `json:"enabled"`
} `json:"watchdog"`
@@ -70,7 +74,13 @@ var CurrentConfig = Config{
ListenPort: "7000",
FrpcPath: "",
InstancePath: "",
LogsPath: "",
Debug: false,
Status: struct{
IsLogrotateConfigured bool `json:"isLogrotateConfigured"`
}{
IsLogrotateConfigured: false,
},
Watchdog: struct {
Enabled bool `json:"enabled"`
}{
@@ -94,4 +104,4 @@ var CurrentConfig = Config{
Headers: "Content-Type: application/json",
Body: "",
},
}
}