Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The placeholder for the directory in the writer.file property can affect the append attribute. #756

Open
aches opened this issue Aug 27, 2024 · 0 comments
Labels

Comments

@aches
Copy link

aches commented Aug 27, 2024

Describe the bug
When I use System.setProperty("tinylog.directory", path), the append property not works, and the log file gets overwritten every time the application starts.

To Reproduce

writer2          = rolling file
writer2.level    = debug
writer2.file     = #{tinylog.directory}/log_{date:yyyy-MM-dd}.txt
writer2.append   = true
writer2.backups  = 10
writer2.format   = {date: HH:mm:ss.SSS} {level} {class}.{method}():{line}: {message}
writer2.charset = UTF-8
writer2.policies = size: 512mb

java code:
String path = Environment.getExternalStoragePublicDirectory("lb_logs").getPath() + "/"; System.setProperty("tinylog.directory", path);
Environment
tinylog version: 2.7.0
Java version: 11.0.21

@aches aches added the bug label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant