gookit / slog

📑 Lightweight, configurable, extensible logging library written in Go. Support multi level, multi outputs and built-in multi file logger, buffers, clean, rotate-file handling.一个易于使用的,轻量级、可配置、可扩展的日志库。支持多个级别,输出到多文件;内置文件日志处理、自动切割、清理、压缩等增强功能
https://pkg.go.dev/github.com/gookit/slog
MIT License
393 stars 25 forks source link

Fixes the directory for cleaning files #146

Closed ybaldus closed 3 months ago

ybaldus commented 4 months ago

I noticed that the logs were not cleaned at all. By looking through the code I noticed that the last letter of the directory gets stripped. I changed this to remove only the trailing slash.

I also noticed that a directory is always required within the file path e.g. "xyz.log", one has to enter "./xyz.log". Should that be documented somewhere?

ybaldus commented 4 months ago

@inhere is there anything I can do to fix the unit tests? I just run them locally.

inhere commented 3 months ago

@inhere is there anything I can do to fix the unit tests? I just run them locally.

👍 Thanks, I'll adjust and fix it again