You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. Thanks for your contribution to the Rust ecosystem.
I was reading the documentation for the compressed logging. I was puzzled to find all this discussion of "zip" files. It would be highly unusual for a program to write logs in actual zip format (the format expected by unzip). Traditional log management programs like logrotate and savelog make gzip files ending in .gz. Tools like zgrep which are usually used for inspecting logs expect gzip files.
I looked at the code, and indeed flexi_logger does make gzipped logfiles. But it calls them .zip, and the documentation is wrong too. Unfortunately I don't think this can fixed without at least some kind of breaking change: currently the file contents and file extension do not match.
I suggest that the right complete fix is to change (i) the file extension, from .zip to .gz (ii) the documentation, to refer to gzip rather than zip, (iii) all the in-Rust names, changing Zip to Gzip everywhere, (iv) all the corresponding names in the configuration (env, specfile, etc.). [Option 1]
How much do you want to worry about compatibility ? In some of these cases it would be possible to provide aliases, although that's a fair amount of work. I think we could provide aliases for the builder methods and probably for the configuration. [Option 2]
Going in the other direction, we could retain the existing programmatic names and merely change the docs and the file extension. That would avoid this being a build break, and in practice would be unlikely to break production systems, although it would leave the anomalous names in Rust source code and logger spec files. This is also quite easy, since the spec handling wouldn't need changing :-). [Option 3]
Since we'll be changing the file extension, I guess we should arrange to at least rotate away the .zip files made by older versions of flexi_logger, to avoid a situation where ancient .zip files , obsoleted by recent .gz files, are retained forever.
Please let me know what you prefer. I am happy to do the work to implement what I call options 1 and 3 above. My recommendation would be to do option 3 right away and then think about whether you need to go on to option 1 or 2.
I apologise for filing what you may see as a duplicate of #42. But I felt #42's framing was wrong. I wanted to set out a coherent (but opinionated) summary of the situation as I see it, under a corresponding title. I hope you find this helpful.
The text was updated successfully, but these errors were encountered:
Hi. Thanks for your contribution to the Rust ecosystem.
I was reading the documentation for the compressed logging. I was puzzled to find all this discussion of "zip" files. It would be highly unusual for a program to write logs in actual zip format (the format expected by
unzip
). Traditional log management programs likelogrotate
andsavelog
make gzip files ending in.gz
. Tools likezgrep
which are usually used for inspecting logs expect gzip files.I looked at the code, and indeed flexi_logger does make gzipped logfiles. But it calls them
.zip
, and the documentation is wrong too. Unfortunately I don't think this can fixed without at least some kind of breaking change: currently the file contents and file extension do not match.I suggest that the right complete fix is to change (i) the file extension, from
.zip
to.gz
(ii) the documentation, to refer to gzip rather than zip, (iii) all the in-Rust names, changingZip
toGzip
everywhere, (iv) all the corresponding names in the configuration (env, specfile, etc.). [Option 1]How much do you want to worry about compatibility ? In some of these cases it would be possible to provide aliases, although that's a fair amount of work. I think we could provide aliases for the builder methods and probably for the configuration. [Option 2]
Going in the other direction, we could retain the existing programmatic names and merely change the docs and the file extension. That would avoid this being a build break, and in practice would be unlikely to break production systems, although it would leave the anomalous names in Rust source code and logger spec files. This is also quite easy, since the spec handling wouldn't need changing :-). [Option 3]
Since we'll be changing the file extension, I guess we should arrange to at least rotate away the
.zip
files made by older versions of flexi_logger, to avoid a situation where ancient.zip
files , obsoleted by recent.gz
files, are retained forever.Please let me know what you prefer. I am happy to do the work to implement what I call options 1 and 3 above. My recommendation would be to do option 3 right away and then think about whether you need to go on to option 1 or 2.
I apologise for filing what you may see as a duplicate of #42. But I felt #42's framing was wrong. I wanted to set out a coherent (but opinionated) summary of the situation as I see it, under a corresponding title. I hope you find this helpful.
The text was updated successfully, but these errors were encountered: