You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Giovanni Bechis (JIRA)" <ji...@apache.org> on 2019/03/27 07:52:00 UTC

[jira] [Commented] (LOG4PHP-239) Compress parameter doesn't seem to activate compression

    [ https://issues.apache.org/jira/browse/LOG4PHP-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16802520#comment-16802520 ] 

Giovanni Bechis commented on LOG4PHP-239:
-----------------------------------------

Hi,

using this configuration file works for me with php-7.1:
{code:java}
<configuration xmlns="http://logging.apache.org/log4php/">
    <appender name="default" class="LoggerAppenderRollingFile">
        <layout class="LoggerLayoutSimple" />
        <param name="file" value="t1.log" />
        <param name="compress" value="true" />
        <param name="maxFileSize" value="1KB" />
        <param name="maxBackupIndex" value="5" />
    </appender>
    <root>
        <appender_ref ref="default" />
    </root>
</configuration>
{code}

> Compress parameter doesn't seem to activate compression
> -------------------------------------------------------
>
>                 Key: LOG4PHP-239
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-239
>             Project: Log4php
>          Issue Type: Bug
>          Components: Code
>    Affects Versions: 2.3.0
>         Environment: PHP 5.4, CentOS 5.11
>            Reporter: Pavel Savchenko
>            Priority: Major
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I have been using log4php for a long while now (ver 2.3.0) in a simple web application running on PHP 5.4.
> I've recently changed my log4php.xml config file to add compression and increased max file size, like so:
> {code}
> <appender name="MyFileAppender" class="LoggerAppenderRollingFile">
>     <layout class="LoggerLayoutTTCC" />
>     <param name="file" value="/path/to/my_log_file.log" />
>     <param name="maxFileSize" value="2000MB" />
>     <param name="compress" value="true" />
>     <param name="maxBackupIndex" value="10" />
> </appender>
> {code}
> What seems to happen is that the files are rotated, after 2GB as intended, however the files are not archived (and of course no .gz extension is added). Furthermore, the output of {{php -r "print(extension_loaded('zlib'));"}} is {{1}}
> Am I missing something in the configuration? Can I provide further information to debug the issue?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)