xinliangnote/Go

你好,win10上有异常提示

zhanxh opened this issue · 3 comments

failed to rotate: failed to rename new symlink: rename F:/testlog.log.20191111.log_symlink F:/testlog.log: Access is denied.

Failed to write to log, invalid argument

日志中间件加了日志切割的hook以后的代码有问题,日志文件名如果不提前创建,会提示打开文件失败,而且每到打印日志时就会报错Failed to write to log, invalid argument。如果提前创建了,切割文件时就会报创建软链接失败,日志会写两份。带日期后缀的一份,原文件一份

日志这块,已修改,可以参考代码:https://github.com/xinliangnote/go-gin-api