You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Daniel Mantzakos <da...@hotmail.com> on 2020/04/16 14:17:32 UTC

Log4j2 Delete on Rollover does not delete folders prior to the maxDepth

Hi,

I am using log4j2 (2.8.2) and trying to use the Delete on Rollover action.
All the files up to the maxDepth level are deleted normally.
The problem is that all the folders prior to the maxDepth are not deleted.
For example, when I set maxDepth=3, the folders in levels 1 and 2 are not deleted. Only the folders in level 3 are deleted.

After setting the internal log4j status to trace, I can see that log4j sorts and prints in its log the paths of all the files existing up to level 3 and all the folders existing in level 3. The paths of the folders (in level 1 and 2) which are not deleted, are not printed in the log file. Therefore, it is not that it tries to delete them and it cannot, but it does not list these paths at all, that is why it never deletes them.

Could you please inform me if this is a bug and if it is, how can I report it?

Thank you,
Daniel

Re: Log4j2 Delete on Rollover does not delete folders prior to the maxDepth

Posted by Matt Sicker <bo...@gmail.com>.
I can't find any reported issues related to that. As far as I can tell
from the documentation, only the behavior for deleting files is
described. Even the example given uses maxDepth=2, so I'm not sure if
there is an expected behavior for larger numbers.

On Thu, 16 Apr 2020 at 09:27, Daniel Mantzakos
<da...@hotmail.com> wrote:
>
> Hi,
>
> I am using log4j2 (2.8.2) and trying to use the Delete on Rollover action.
> All the files up to the maxDepth level are deleted normally.
> The problem is that all the folders prior to the maxDepth are not deleted.
> For example, when I set maxDepth=3, the folders in levels 1 and 2 are not deleted. Only the folders in level 3 are deleted.
>
> After setting the internal log4j status to trace, I can see that log4j sorts and prints in its log the paths of all the files existing up to level 3 and all the folders existing in level 3. The paths of the folders (in level 1 and 2) which are not deleted, are not printed in the log file. Therefore, it is not that it tries to delete them and it cannot, but it does not list these paths at all, that is why it never deletes them.
>
> Could you please inform me if this is a bug and if it is, how can I report it?
>
> Thank you,
> Daniel



-- 
Matt Sicker <bo...@gmail.com>

Re: Log4j2 Delete on Rollover does not delete folders prior to the maxDepth

Posted by Ralph Goers <ra...@dslextreme.com>.
Your original email was replied to on the Log4j mailing list. You need to subscribe to see it. You can review the reply at http://mail-archives.apache.org/mod_mbox/logging-dev/202004.mbox/browser <http://mail-archives.apache.org/mod_mbox/logging-dev/202004.mbox/browser>.

Ralph


> On May 4, 2020, at 9:53 AM, Daniel Mantzakos <da...@hotmail.com> wrote:
> 
> Hi,
> 
> Could you please reply to my email?
> 
> Thank you,
> Daniel
> 
> From: Daniel Mantzakos<ma...@hotmail.com>
> Sent: Πέμπτη, 16 Απριλίου 2020 5:17 μμ
> To: dev@logging.apache.org<ma...@logging.apache.org>
> Subject: Log4j2 Delete on Rollover does not delete folders prior to the maxDepth
> 
> Hi,
> 
> I am using log4j2 (2.8.2) and trying to use the Delete on Rollover action.
> All the files up to the maxDepth level are deleted normally.
> The problem is that all the folders prior to the maxDepth are not deleted.
> For example, when I set maxDepth=3, the folders in levels 1 and 2 are not deleted. Only the folders in level 3 are deleted.
> 
> After setting the internal log4j status to trace, I can see that log4j sorts and prints in its log the paths of all the files existing up to level 3 and all the folders existing in level 3. The paths of the folders (in level 1 and 2) which are not deleted, are not printed in the log file. Therefore, it is not that it tries to delete them and it cannot, but it does not list these paths at all, that is why it never deletes them.
> 
> Could you please inform me if this is a bug and if it is, how can I report it?
> 
> Thank you,
> Daniel
> 


RE: Log4j2 Delete on Rollover does not delete folders prior to the maxDepth

Posted by Daniel Mantzakos <da...@hotmail.com>.
Hi,

Could you please reply to my email?

Thank you,
Daniel

From: Daniel Mantzakos<ma...@hotmail.com>
Sent: Πέμπτη, 16 Απριλίου 2020 5:17 μμ
To: dev@logging.apache.org<ma...@logging.apache.org>
Subject: Log4j2 Delete on Rollover does not delete folders prior to the maxDepth

Hi,

I am using log4j2 (2.8.2) and trying to use the Delete on Rollover action.
All the files up to the maxDepth level are deleted normally.
The problem is that all the folders prior to the maxDepth are not deleted.
For example, when I set maxDepth=3, the folders in levels 1 and 2 are not deleted. Only the folders in level 3 are deleted.

After setting the internal log4j status to trace, I can see that log4j sorts and prints in its log the paths of all the files existing up to level 3 and all the folders existing in level 3. The paths of the folders (in level 1 and 2) which are not deleted, are not printed in the log file. Therefore, it is not that it tries to delete them and it cannot, but it does not list these paths at all, that is why it never deletes them.

Could you please inform me if this is a bug and if it is, how can I report it?

Thank you,
Daniel