Sling log rotation pattern - twice a day not working as expected | Community
Skip to main content
Level 3
Jan 14, 2021 8:57 PM UTC
Solved

Sling log rotation pattern - twice a day not working as expected

Has anyone been successful in getting the sling log rotation pattern for twice a day - at noon and at midnight to actually work?  '.'yyyy-MM-dd-a ”

Other patterns work as expected, but this one seems to just rotate once a day at midnight with the addition of AM or PM on the filepath instead of actually generating 2 per day.

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
yonit_davidAccepted solution
Level 3
Feb 19, 2021 12:25 PM UTC

This was found to be a bug and a jira was created for it.


Sling has logback integration for all logging-related activities.
Date Pattern('.'yyyy-MM-dd-a ) is not treated as valid pattern in logback.[0].
The corresponding bug has been raised in logback Jira - https://jira.qos.ch/browse/LOGBACK-1552
According to the status of logback JIRA, we will keep updating this JIRA
[0]: https://github.com/qos-ch/logback/blob/bbc783e6d68482abe8e7dff0d06708175e971b91/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/PeriodicityType.java#L22

The issue is pending with Sling to fix the same which than be included in our AEM as part of Service pack, so I would request you to please use wait for the SP to fix the issue because the issues can be fixed only via SP/CFP cadence as Adobe recommended.

4 replies

yonit_davidAuthorAccepted solution
Level 3
Feb 19, 2021 12:25 PM UTC

This was found to be a bug and a jira was created for it.


Sling has logback integration for all logging-related activities.
Date Pattern('.'yyyy-MM-dd-a ) is not treated as valid pattern in logback.[0].
The corresponding bug has been raised in logback Jira - https://jira.qos.ch/browse/LOGBACK-1552
According to the status of logback JIRA, we will keep updating this JIRA
[0]: https://github.com/qos-ch/logback/blob/bbc783e6d68482abe8e7dff0d06708175e971b91/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/PeriodicityType.java#L22

The issue is pending with Sling to fix the same which than be included in our AEM as part of Service pack, so I would request you to please use wait for the SP to fix the issue because the issues can be fixed only via SP/CFP cadence as Adobe recommended.

Translate
Vijayalakshmi_S
Level 10
Jan 20, 2021 4:08 PM UTC

Hi @yonit_david,

Per the significance of this pattern from Sling docs, could see that there is no explicit generation of 2 files per day.(Should be with AM and PM)

Could you confirm if is deviating the below explanation.

https://sling.apache.org/documentation/development/logging.html

 

Note : I will try from my end as well and update this thread.

Translate
Level 3
Jan 20, 2021 4:15 PM UTC

Thank you so much for your response! It says until it is rolled over at midnight. It is clear to me from this definition that there should be a rollover at noon under AM and a rollover at midnight under PM. I only get a rollover at midnight as AM and none at noon at all, which does not seem to follow the definition here.

This is what I am getting on error log:

 

 

Translate