From 964a871e68f0bd78250c70729f809258996d8a44 Mon Sep 17 00:00:00 2001 From: Reza Date: Tue, 17 Dec 2024 05:28:31 +0100 Subject: [PATCH] file logger fix --- docs/file_logger.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/file_logger.md b/docs/file_logger.md index 66544a2..1abcd20 100644 --- a/docs/file_logger.md +++ b/docs/file_logger.md @@ -33,6 +33,7 @@ package main import ( "github.com/getevo/evo/v2/lib/log" "github.com/getevo/evo/v2/lib/log/file" // Replace with the correct import path + "time" ) func main() { @@ -40,7 +41,7 @@ func main() { log.AddWriter(file.NewFileLogger(file.Config{ Path: "./logs", // Directory to store logs FileName: "app_%y-%m-%d.log", // Filename template with wildcards - Expiration: 7, // Keep logs for 7 days + Expiration: 7*time.Day, // Keep logs for 7 days LogFormat: nil, // Use default log format }))