Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version_1.2.13 Hourly generated logs cannot be deleted #847

Open
liangchenm opened this issue Aug 22, 2024 · 2 comments
Open

version_1.2.13 Hourly generated logs cannot be deleted #847

liangchenm opened this issue Aug 22, 2024 · 2 comments
Assignees
Labels

Comments

@liangchenm
Copy link

liangchenm commented Aug 22, 2024

log rollingPolicy setting

<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${log.base}/****.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern>
            <maxHistory>30</maxHistory>
            <maxFileSize>200MB</maxFileSize>
            <totalSizeCap>20GB</totalSizeCap>
            <cleanHistoryOnStart>true</cleanHistoryOnStart>
        </rollingPolicy>

Found that this line of code caused,ch.qos.logback.core.rolling.helper.RollingCalendar#periodBarriersCrossed

case TOP_OF_HOUR:
            return (int) diff / MILLIS_IN_ONE_HOUR;
@liangchenm liangchenm changed the title Hourly generated logs cannot be deleted version_1.2.13 Hourly generated logs cannot be deleted Aug 22, 2024
@Eopue
Copy link

Eopue commented Sep 4, 2024

I encountered the same problem, but my version is 1.2.3

When the long type is forcibly converted to the int type, it is less than 0

image image

@ceki ceki added the WONT_FIX label Sep 4, 2024
@ceki
Copy link
Member

ceki commented Sep 4, 2024

@liangchenm Only security issues are back-ported to the 1.2 branch. Please upgrade to logback 1.5 or later.

@ceki ceki self-assigned this Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants