Skip to content

Support rolling files with any writer #766

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

Open
hogejo opened this issue Apr 11, 2025 · 2 comments
Open

Support rolling files with any writer #766

hogejo opened this issue Apr 11, 2025 · 2 comments

Comments

@hogejo
Copy link

hogejo commented Apr 11, 2025

It would be nice to support writing to rolling files - regardless of the writer being used.

I suggest refactoring the logic from being a separate writer into a shared abstraction by all writers. However I only skimmed the codebase and I am not sure if this would risk introducing a performance overhead.

On a more personal/customer side note, I am also considering the ROI on switching to something like kotlin-logging + Logback vs. implementing this in Tinylog. I personally prefer Tinylog, so I am looking for your thoughts on this @pmwmedia .

@pmwmedia
Copy link
Member

In tinylog 2, we have file based writers: file writer, rolling file writer, JSON writer, and shared file writer

And also non-file based writers: console writer, JDBC writer, Logcat writer, and Syslog writer

Rolling files makes only sense for file based writers. What could we roll in the other writers? What would be the use case to roll the other writers?

In tinylog 3, I have combined all file based writers into a single writer: https://github.com/tinylog-org/website/blob/v3/content/documentation/configuration.md#file-writer, of course with support for rolling files.

@hogejo
Copy link
Author

hogejo commented Apr 11, 2025

By "all writers" I meant "all other file based writers".

This is already in v3? Awesome! How can we help the v3 release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants