You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2018/08/09 12:02:20 UTC

[Bug 62611] New: Compress log files after rotation

https://bz.apache.org/bugzilla/show_bug.cgi?id=62611

            Bug ID: 62611
           Summary: Compress log files after rotation
           Product: Tomcat 9
           Version: 9.0.10
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: ebourg@apache.org
  Target Milestone: -----

Log files generated by the AccessLogValve and the JULI FileHandler could be
automatically compressed after the rotation to save space.

Some thoughts on a possible implementation:
- the compression is optional and configured by new valve/handler parameters.
- the actual compression could occur a few days after the rotation to keep the
recent log files easily readable.
- configuring the compression format would be nice but not essential, the files
can simply be gziped.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62611] Compress log files after rotation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62611

--- Comment #3 from Christopher Schultz <ch...@christopherschultz.net> ---
Thanks for your interest. A PR from GitHub will be fine. No need to attach it
to this bug, but please do provide a reference to this bug in your PR and a
reference to your PR in this bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62611] Compress log files after rotation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62611

--- Comment #11 from HanLi <ao...@gmail.com> ---
(In reply to Christopher Schultz from comment #10)
Hi Christopher,
> The quality of this patch/PR is low. Several unresolved comments have been
> made on the PR already.
> 
> There isn't any proper resource-management.
I mean that i will fix this unresovled comments based on some advices.

> 
> The CompressFileUtils class appears to be added twice under two separate
> packages (why the duplication?).
I found this too,and i think the reason for this is only known to the author
himself,and i will keep just one.

> 
> I have to ask again why this is being added as a feature of the
> AccessLogValve and not just sending access logs to a proper logging
> framework which already supports compression, rotation, etc.?
I aggree with you that using a logging framework that support these festures is
the better way. But i have a question that this feature is not supported by
AccessLogValve, it need user to implement AbstractAccessLogValve to support the
function of sending logs to other logging frameworks,right?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62611] Compress log files after rotation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62611

--- Comment #2 from habuzahra <ha...@gmail.com> ---
I will take this feature and work on it . I will add the patch here in the
attachment and share the GitHub

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62611] Compress log files after rotation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62611

--- Comment #5 from Christopher Schultz <ch...@christopherschultz.net> ---
Please leave the Bugzilla "Assigned" field alone so that the dev list continues
to get notifications of bug status updates. (Yes, I know this is possible via
other means, but this is how the Tomcat team usually handles BZ issues.) I
don't believe anyone else is working on this, so you shouldn't have any
problems with coordination.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62611] Compress log files after rotation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62611

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #8 from Christopher Schultz <ch...@christopherschultz.net> ---
Can you post a link to your GitHub fork and/or the PR itself?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62611] Compress log files after rotation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62611

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
Be careful; sometimes log files can be large and compressing them can take a
while.

I would recommend against adding more code to Tomcat that solves a problem
already solved by better logging frameworks. Tomcat can be configured to use a
logging framework for access-logs, so why not use e.g. log4j or the myriad
other frameworks which already support rotation, compression, etc.?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62611] Compress log files after rotation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62611

--- Comment #4 from habuzahra <ha...@gmail.com> ---
Is it possible to assign it to me ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62611] Compress log files after rotation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62611

--- Comment #7 from habuzahra <ha...@gmail.com> ---
Hello ,

I had pulled the changes to the under Log compression #223 to the tomcat githup
repository , but there was no review. any Idea .

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62611] Compress log files after rotation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62611

--- Comment #6 from Mark Thomas <ma...@apache.org> ---
Note: The ASF bugzilla instance has been modified so the assignee field is
hard-coded to the relevant dev@ list.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62611] Compress log files after rotation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62611

--- Comment #9 from HanLi <ao...@gmail.com> ---
hi all,
Can I continue with this task based on PR#223?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62611] Compress log files after rotation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62611

--- Comment #10 from Christopher Schultz <ch...@christopherschultz.net> ---
The quality of this patch/PR is low. Several unresolved comments have been made
on the PR already.

There isn't any proper resource-management.

The CompressFileUtils class appears to be added twice under two separate
packages (why the duplication?).

I have to ask again why this is being added as a feature of the AccessLogValve
and not just sending access logs to a proper logging framework which already
supports compression, rotation, etc.?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org