Closed mtkennerly closed 1 month ago
Might be caused by https://github.com/rust-lang/glob/issues/145.
Could you please try using method dunce::simplified
on the path that you give to flexi_logger::FileSpec::directory()
?
That works for paths like r"\\?\C:\tmp"
(which I simplify already), but not for paths like r"\\?\UNC\localhost\share-name"
, unfortunately. That kind of path can't be simplified.
With version 0.29.3 I removed the dependency to glob
and implemented the necessary file searches explicitly. This should have the "side-effect" to also fix this issue here.
I can confirm the new version works for me 🎉 Thanks!
Hi! On Windows, with something like
.log_to_file(FileSpec::default().directory(r"\\?\C:\tmp"))
with rotation, I see the following behavior:rCURRENT.log
gets rotated and renamed correctlyFor many paths, I can simplify the UNC style (
\\?\C:\
->C:\
), but that's not always possible. In particular, I have a use case involving Windows network shares, which use paths like\\?\UNC\localhost\share-name
.For context, here's my full logging setup: https://github.com/mtkennerly/ludusavi/blob/0067872d697008252d22fb7452ce1f0353437557/src/main.rs#L24-L49