Hi Yonit,

On Wed, 2021-01-27 at 15:51 +0000, Yonit David wrote:
> 
> Hi Robert,
> Sorry about that.  Does this work?
> <?xml version="1.0" encoding="UTF-8"?>
> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0";
> xmlns:jcr="http://www.jcp.org/jcr/1.0";
>     jcr:primaryType="sling:OsgiConfig"
>     org.apache.sling.commons.log.file="logs/error.log"
>     org.apache.sling.commons.log.file.number="5"
>     org.apache.sling.commons.log.file.size="'.'yyyy-MM-dd-a"/>

Yes :-)

I followed the code paths and found out that we are passing the
parameter to the logback TimeBasedRollingPolicy, see [1].

I don't see anything incorrect here, so not sure what we can do. I
could think of a couple of things you can try to sort this out

a. Start with logback in debug mode by adding -Dlogback.debug=true to
your launch script and see if the pattern used matches your
expectations, e.g. "Configured TimeBasedRollingPolicy with pattern 
..." or if you spot something else going wrong.

b. Try and configure a plain Logback application with the log rotation
pattern and see if that works.

Hope this helps,
Robert

P.S. It would make the conversation easier to follow for me and others
if you would use bottom-posting [2] when replying to emails. Thanks!

[1]: 
https://github.com/apache/sling-org-apache-sling-commons-log/blob/c7d5ac9b2b1ddaae48f3d160b6b001b9f9428059/src/main/java/org/apache/sling/commons/log/logback/internal/LogWriter.java#L200-L211
[2]: https://en.wikipedia.org/wiki/Posting_style#Bottom-posting

Reply via email to