Proper log rotation, filename compatibility with windows
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/debridmediamanager/zurg/internal/clear"
|
||||
"github.com/debridmediamanager/zurg/internal/version"
|
||||
@@ -23,10 +22,7 @@ func NetworkTest(testURL string) {
|
||||
utils.EnsureDirExists("logs")
|
||||
utils.EnsureDirExists("data")
|
||||
|
||||
dateStr := time.Now().Format(time.DateOnly)
|
||||
timeStr := strings.ReplaceAll(time.Now().Format(time.TimeOnly), ":", "-")
|
||||
logPath := fmt.Sprintf("logs/network-test-%s-%s.log", dateStr, timeStr)
|
||||
log := logutil.NewLogger(logPath)
|
||||
log := logutil.NewLogger("logs/network-test.log")
|
||||
|
||||
proxyURL := os.Getenv("PROXY")
|
||||
if proxyURL != "" {
|
||||
|
||||
Reference in New Issue
Block a user