Closed jb-alvarado closed 5 months ago
Sorry @emabee that I disturbing you again. Thank you that you have merge and optimize my pull request.
The only sad thing is now, that: when you want a empty currentinfix the logic adds a **** to the basename. For example:
let writer = FileLogWriter::builder( FileSpec::default() .suppress_timestamp() .basename("ffplayout") ) .append() .rotate( Criterion::Age(Age::Day), Naming::TimestampsCustomFormat { current_infix: Some(""), format: "%Y-%m-%d", }, Cleanup::KeepLogFiles(7), )
Gives a file: ./ffplayout_.log. My goal was to just get : ./ffplayout.log, that is the normal behavior most programs in linux logs to /var/log/.
./ffplayout_.log
./ffplayout.log
/var/log/
Good point, I wasn't aware of this case. I added the support for this to 0.28.3
Sorry @emabee that I disturbing you again. Thank you that you have merge and optimize my pull request.
The only sad thing is now, that: when you want a empty currentinfix the logic adds a **** to the basename. For example:
Gives a file:
./ffplayout_.log
. My goal was to just get :./ffplayout.log
, that is the normal behavior most programs in linux logs to/var/log/
.