-
Notifications
You must be signed in to change notification settings - Fork 25
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
log rotation renaming #26
Comments
I'm not sure what you mean here. A On my system, in the log directory, I have the following:
Now, the regular files (with a plain Here's some examples:
This shows what is compressed and what is not compressed. Furthermore:
This is exactly what I expect. The most recent log is uncompressed so you can see it easily. For the other logs, you need a program to allow you to decompress it and view it. But it is no container, as you can see:
As you can see, this is just a plain text file. It's not a "container" (a container, like a I suspect that you're confused due to unfamiliarity with the Hope this clarifies. Please close this issue if you're clear, or feel free to ask further questions. |
Sorry for wrong terminology regarding archives/compresed files. In my understanding, after decompression I should get an original file, right? Let say I have a file
I apply compression to it:
If I uncompress it, I will obtain the original file:
My expectations were the same for duplicacy-util logs: If I uncompress a compressed log, I would get an original log file, e.g., Your own example shows that even before compression, the log filename was already appended with
After running On Windows, however, this causes confusion. I do not have a viewer which understands gzipped files out of the box, so I have to decompress a log first. In real life I use gui-based tools, but I will illustrate it here with the command-line version of 7zip archiver:
I decompress it:
Now I have file named
So I have impression that the log rotation algorithm makes an unnesessaty step first renaming the |
I understand the issue. I was working off of assumptions of how
Here you can see that, by convention (unless told to decompress to stdout or something), Now, looking at the code, I do not actually rename the file before compressing. I open the original file for reading, open the new file (with the I'll look at this. |
It was the header, note below:
If you note file This should be transparent on my platforms, and strictly speaking, the original name was not already compressed. So this fix is correct. I'l commit this to master shortly. |
An error in the gzip header (during log file rotation) resulted in the linux "file" command thinking the original name of log files were file.log.1.gz rather than file.log. This caused problems on Windows with some of the GUI tools. Fixes issue #26
A small issue: seems like currently the log rotator first renames the existing
config_name.log
toconfig_name.log.1.gz
and then puts it into archive.I have 10 archived logs
de_tools.log.1.gz, de_tools.log.2.gz, ..., de_tools.log.10.gz
. Inside every archive, there is always a file named 'de_tools.log.1.gz' which actually is not an archive but just a plaint text log file.The text was updated successfully, but these errors were encountered: