log4rs icon indicating copy to clipboard operation
log4rs copied to clipboard

FixedWindowRoller is unreliable under Linux and Windows

Open Coding-Badly opened this issue 3 years ago • 2 comments

Background

This is a potential solution for issue #213.

Linux and Windows file systems allow illegal Unicode sequences for directory names and file names. The Rust folk provide OsStr and OsString for dealing with the problem.

Currently, log4rs uses Rust strings for directory names and file names which makes it troublesome to use when an illegal Unicode sequence is involved.

The R&D repository for this work is available here. It includes an example that creates folders with an illegal Unicode sequence under Linux and Windows.

Change

This pull request introduces PatternPathBuf. Essentially it's a PathBuf with support for safely replacing {} eye-catchers.

Coding-Badly avatar May 07 '21 06:05 Coding-Badly

@Coding-Badly This change makes sense, there are a few other breaking changes that I'd like to make so maybe we'll keep this open for a bit while we proceed towards 2.0?

estk avatar May 12 '21 15:05 estk

...a few other breaking changes...

If this is a breaking change then I made a mistake. 😄

...maybe we'll keep this open for a bit while we proceed towards 2.0?

I'm good with that.

Coding-Badly avatar May 12 '21 16:05 Coding-Badly