mirror of
https://github.com/cubixle/gridlock.git
synced 2026-04-24 21:24:42 +01:00
update default stats dir
This commit is contained in:
4
main.go
4
main.go
@@ -145,7 +145,7 @@ func safeJoin(baseDir, targetDir string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func fileHandler(w http.ResponseWriter, r *http.Request) {
|
func fileHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
fileDir := cmp.Or(os.Getenv("LOG_FILE_DIR"), "logs/helprob")
|
fileDir := cmp.Or(os.Getenv("LOG_FILE_DIR"), "logs/gridlock")
|
||||||
|
|
||||||
requestedDir, err := url.QueryUnescape(r.URL.Query().Get("dir"))
|
requestedDir, err := url.QueryUnescape(r.URL.Query().Get("dir"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -207,7 +207,7 @@ func fileHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func writeStatsToFile() error {
|
func writeStatsToFile() error {
|
||||||
fileDir := cmp.Or(os.Getenv("LOG_FILE_DIR"), "./logs/helprob")
|
fileDir := cmp.Or(os.Getenv("LOG_FILE_DIR"), "./logs/gridlock")
|
||||||
|
|
||||||
slog.Info("Configured to write stats file", "destination", fileDir)
|
slog.Info("Configured to write stats file", "destination", fileDir)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user