@@ -11,6 +11,7 @@ import (
1111 "github.com/xinliangnote/go-gin-api/pkg/env"
1212 "github.com/xinliangnote/go-gin-api/pkg/logger"
1313 "github.com/xinliangnote/go-gin-api/pkg/shutdown"
14+ "github.com/xinliangnote/go-gin-api/pkg/time_parse"
1415
1516 "go.uber.org/zap"
1617)
@@ -33,7 +34,7 @@ func main() {
3334 accessLogger , err := logger .NewJSONLogger (
3435 logger .WithDisableConsole (),
3536 logger .WithField ("domain" , fmt .Sprintf ("%s[%s]" , configs .ProjectName , env .Active ().Value ())),
36- logger .WithTimeLayout ("2006-01-02 15:04:05" ),
37+ logger .WithTimeLayout (time_parse . CSTLayout ),
3738 logger .WithFileP (configs .ProjectAccessLogFile ),
3839 )
3940 if err != nil {
@@ -44,7 +45,7 @@ func main() {
4445 cronLogger , err := logger .NewJSONLogger (
4546 logger .WithDisableConsole (),
4647 logger .WithField ("domain" , fmt .Sprintf ("%s[%s]" , configs .ProjectName , env .Active ().Value ())),
47- logger .WithTimeLayout ("2006-01-02 15:04:05" ),
48+ logger .WithTimeLayout (time_parse . CSTLayout ),
4849 logger .WithFileP (configs .ProjectCronLogFile ),
4950 )
5051
0 commit comments