[jira] [Commented] (ARTEMIS-4531) Limit logfile output by default

2023-12-20 Thread Geert Schuring (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799063#comment-17799063
 ] 

Geert Schuring commented on ARTEMIS-4531:
-

TLDR: Doesn't work as intended. Lets delete the PR and close this issue.

I've commented on the PR: 
[https://github.com/apache/activemq-artemis/pull/4718#issuecomment-1864656817]

 

> Limit logfile output by default
> ---
>
> Key: ARTEMIS-4531
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4531
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: Broker
>Affects Versions: 2.31.2
>Reporter: Geert Schuring
>Priority: Minor
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> The logging config does not limit the amount of rolled-over logfiles that are 
> stored, causing a minor resource leak. The system will (eventually) run out 
> of disk space without manual intervention.
> The relevant config in etc/log4j2.properties currently looks like this:
> {code:java}
> # Log file appender
> appender.log_file.type = RollingFile
> appender.log_file.name = log_file
> appender.log_file.fileName = ${sys:artemis.instance}/log/artemis.log
> appender.log_file.filePattern = 
> ${sys:artemis.instance}/log/artemis.log.%d{-MM-dd}
> appender.log_file.layout.type = PatternLayout
> appender.log_file.layout.pattern = %d %-5level [%logger] %msg%n
> appender.log_file.policies.type = Policies
> appender.log_file.policies.cron.type = CronTriggeringPolicy
> appender.log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.log_file.policies.cron.evaluateOnStartup = true
> # Audit log file appender
> appender.audit_log_file.type = RollingFile
> appender.audit_log_file.name = audit_log_file
> appender.audit_log_file.fileName = ${sys:artemis.instance}/log/audit.log
> appender.audit_log_file.filePattern = 
> ${sys:artemis.instance}/log/audit.log.%d{-MM-dd}
> appender.audit_log_file.layout.type = PatternLayout
> appender.audit_log_file.layout.pattern = %d [AUDIT](%t) %msg%n
> appender.audit_log_file.policies.type = Policies
> appender.audit_log_file.policies.cron.type = CronTriggeringPolicy
> appender.audit_log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.audit_log_file.policies.cron.evaluateOnStartup = true{code}
> This results in a new log file every day if there is any logging output. 
> These files are never deleted and keep accumulating.
> After setting a limit of 5 files it looks like this:
> {code:java}
> # Log file appender
> appender.log_file.type = RollingFile
> appender.log_file.name = log_file
> appender.log_file.fileName = ${sys:artemis.instance}/log/artemis.log
> appender.log_file.filePattern = 
> ${sys:artemis.instance}/log/artemis.log.%d{-MM-dd}
> appender.log_file.layout.type = PatternLayout
> appender.log_file.layout.pattern = %d %-5level [%logger] %msg%n
> appender.log_file.policies.type = Policies
> appender.log_file.policies.cron.type = CronTriggeringPolicy
> appender.log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.log_file.policies.cron.evaluateOnStartup = true
> appender.log_file.strategy.type = DefaultRolloverStrategy
> appender.log_file.strategy.max = 5
> # Audit log file appender
> appender.audit_log_file.type = RollingFile
> appender.audit_log_file.name = audit_log_file
> appender.audit_log_file.fileName = ${sys:artemis.instance}/log/audit.log
> appender.audit_log_file.filePattern = 
> ${sys:artemis.instance}/log/audit.log.%d{-MM-dd}
> appender.audit_log_file.layout.type = PatternLayout
> appender.audit_log_file.layout.pattern = %d [AUDIT](%t) %msg%n
> appender.audit_log_file.policies.type = Policies
> appender.audit_log_file.policies.cron.type = CronTriggeringPolicy
> appender.audit_log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.audit_log_file.policies.cron.evaluateOnStartup = true
> appender.audit_log_file.strategy.type = DefaultRolloverStrategy
> appender.audit_log_file.strategy.max = 5 {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARTEMIS-4531) Limit logfile output by default

2023-12-20 Thread Geert Schuring (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798893#comment-17798893
 ] 

Geert Schuring commented on ARTEMIS-4531:
-

I'm seeing strange behaviour duing some more tests and I'm no longer sure this 
works as intended. Lets put this on hold until I've done more tests.

> Limit logfile output by default
> ---
>
> Key: ARTEMIS-4531
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4531
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: Broker
>Affects Versions: 2.31.2
>Reporter: Geert Schuring
>Priority: Minor
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The logging config does not limit the amount of rolled-over logfiles that are 
> stored, causing a minor resource leak. The system will (eventually) run out 
> of disk space without manual intervention.
> The relevant config in etc/log4j2.properties currently looks like this:
> {code:java}
> # Log file appender
> appender.log_file.type = RollingFile
> appender.log_file.name = log_file
> appender.log_file.fileName = ${sys:artemis.instance}/log/artemis.log
> appender.log_file.filePattern = 
> ${sys:artemis.instance}/log/artemis.log.%d{-MM-dd}
> appender.log_file.layout.type = PatternLayout
> appender.log_file.layout.pattern = %d %-5level [%logger] %msg%n
> appender.log_file.policies.type = Policies
> appender.log_file.policies.cron.type = CronTriggeringPolicy
> appender.log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.log_file.policies.cron.evaluateOnStartup = true
> # Audit log file appender
> appender.audit_log_file.type = RollingFile
> appender.audit_log_file.name = audit_log_file
> appender.audit_log_file.fileName = ${sys:artemis.instance}/log/audit.log
> appender.audit_log_file.filePattern = 
> ${sys:artemis.instance}/log/audit.log.%d{-MM-dd}
> appender.audit_log_file.layout.type = PatternLayout
> appender.audit_log_file.layout.pattern = %d [AUDIT](%t) %msg%n
> appender.audit_log_file.policies.type = Policies
> appender.audit_log_file.policies.cron.type = CronTriggeringPolicy
> appender.audit_log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.audit_log_file.policies.cron.evaluateOnStartup = true{code}
> This results in a new log file every day if there is any logging output. 
> These files are never deleted and keep accumulating.
> After setting a limit of 5 files it looks like this:
> {code:java}
> # Log file appender
> appender.log_file.type = RollingFile
> appender.log_file.name = log_file
> appender.log_file.fileName = ${sys:artemis.instance}/log/artemis.log
> appender.log_file.filePattern = 
> ${sys:artemis.instance}/log/artemis.log.%d{-MM-dd}
> appender.log_file.layout.type = PatternLayout
> appender.log_file.layout.pattern = %d %-5level [%logger] %msg%n
> appender.log_file.policies.type = Policies
> appender.log_file.policies.cron.type = CronTriggeringPolicy
> appender.log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.log_file.policies.cron.evaluateOnStartup = true
> appender.log_file.strategy.type = DefaultRolloverStrategy
> appender.log_file.strategy.max = 5
> # Audit log file appender
> appender.audit_log_file.type = RollingFile
> appender.audit_log_file.name = audit_log_file
> appender.audit_log_file.fileName = ${sys:artemis.instance}/log/audit.log
> appender.audit_log_file.filePattern = 
> ${sys:artemis.instance}/log/audit.log.%d{-MM-dd}
> appender.audit_log_file.layout.type = PatternLayout
> appender.audit_log_file.layout.pattern = %d [AUDIT](%t) %msg%n
> appender.audit_log_file.policies.type = Policies
> appender.audit_log_file.policies.cron.type = CronTriggeringPolicy
> appender.audit_log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.audit_log_file.policies.cron.evaluateOnStartup = true
> appender.audit_log_file.strategy.type = DefaultRolloverStrategy
> appender.audit_log_file.strategy.max = 5 {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARTEMIS-4531) Limit logfile output by default

2023-12-19 Thread Geert Schuring (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798650#comment-17798650
 ] 

Geert Schuring commented on ARTEMIS-4531:
-

Created the pull request: https://github.com/apache/activemq-artemis/pull/4718

> Limit logfile output by default
> ---
>
> Key: ARTEMIS-4531
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4531
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: Broker
>Affects Versions: 2.31.2
>Reporter: Geert Schuring
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The logging config does not limit the amount of rolled-over logfiles that are 
> stored, causing a minor resource leak. The system will (eventually) run out 
> of disk space without manual intervention.
> The relevant config in etc/log4j2.properties currently looks like this:
> {code:java}
> # Log file appender
> appender.log_file.type = RollingFile
> appender.log_file.name = log_file
> appender.log_file.fileName = ${sys:artemis.instance}/log/artemis.log
> appender.log_file.filePattern = 
> ${sys:artemis.instance}/log/artemis.log.%d{-MM-dd}
> appender.log_file.layout.type = PatternLayout
> appender.log_file.layout.pattern = %d %-5level [%logger] %msg%n
> appender.log_file.policies.type = Policies
> appender.log_file.policies.cron.type = CronTriggeringPolicy
> appender.log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.log_file.policies.cron.evaluateOnStartup = true
> # Audit log file appender
> appender.audit_log_file.type = RollingFile
> appender.audit_log_file.name = audit_log_file
> appender.audit_log_file.fileName = ${sys:artemis.instance}/log/audit.log
> appender.audit_log_file.filePattern = 
> ${sys:artemis.instance}/log/audit.log.%d{-MM-dd}
> appender.audit_log_file.layout.type = PatternLayout
> appender.audit_log_file.layout.pattern = %d [AUDIT](%t) %msg%n
> appender.audit_log_file.policies.type = Policies
> appender.audit_log_file.policies.cron.type = CronTriggeringPolicy
> appender.audit_log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.audit_log_file.policies.cron.evaluateOnStartup = true{code}
> This results in a new log file every day if there is any logging output. 
> These files are never deleted and keep accumulating.
> After setting a limit of 5 files it looks like this:
> {code:java}
> # Log file appender
> appender.log_file.type = RollingFile
> appender.log_file.name = log_file
> appender.log_file.fileName = ${sys:artemis.instance}/log/artemis.log
> appender.log_file.filePattern = 
> ${sys:artemis.instance}/log/artemis.log.%d{-MM-dd}
> appender.log_file.layout.type = PatternLayout
> appender.log_file.layout.pattern = %d %-5level [%logger] %msg%n
> appender.log_file.policies.type = Policies
> appender.log_file.policies.cron.type = CronTriggeringPolicy
> appender.log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.log_file.policies.cron.evaluateOnStartup = true
> appender.log_file.strategy.type = DefaultRolloverStrategy
> appender.log_file.strategy.max = 5
> # Audit log file appender
> appender.audit_log_file.type = RollingFile
> appender.audit_log_file.name = audit_log_file
> appender.audit_log_file.fileName = ${sys:artemis.instance}/log/audit.log
> appender.audit_log_file.filePattern = 
> ${sys:artemis.instance}/log/audit.log.%d{-MM-dd}
> appender.audit_log_file.layout.type = PatternLayout
> appender.audit_log_file.layout.pattern = %d [AUDIT](%t) %msg%n
> appender.audit_log_file.policies.type = Policies
> appender.audit_log_file.policies.cron.type = CronTriggeringPolicy
> appender.audit_log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.audit_log_file.policies.cron.evaluateOnStartup = true
> appender.audit_log_file.strategy.type = DefaultRolloverStrategy
> appender.audit_log_file.strategy.max = 5 {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARTEMIS-4531) Limit logfile output by default

2023-12-19 Thread Geert Schuring (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798642#comment-17798642
 ] 

Geert Schuring commented on ARTEMIS-4531:
-

I've created the pullrequest, but 5 minutes later I see one of my servers 
writing more then the configured amount of log files... so lets hold off on 
this change for a sec while I do some more testing just to be sure.

> Limit logfile output by default
> ---
>
> Key: ARTEMIS-4531
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4531
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: Broker
>Affects Versions: 2.31.2
>Reporter: Geert Schuring
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The logging config does not limit the amount of rolled-over logfiles that are 
> stored, causing a minor resource leak. The system will (eventually) run out 
> of disk space without manual intervention.
> The relevant config in etc/log4j2.properties currently looks like this:
> {code:java}
> # Log file appender
> appender.log_file.type = RollingFile
> appender.log_file.name = log_file
> appender.log_file.fileName = ${sys:artemis.instance}/log/artemis.log
> appender.log_file.filePattern = 
> ${sys:artemis.instance}/log/artemis.log.%d{-MM-dd}
> appender.log_file.layout.type = PatternLayout
> appender.log_file.layout.pattern = %d %-5level [%logger] %msg%n
> appender.log_file.policies.type = Policies
> appender.log_file.policies.cron.type = CronTriggeringPolicy
> appender.log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.log_file.policies.cron.evaluateOnStartup = true
> # Audit log file appender
> appender.audit_log_file.type = RollingFile
> appender.audit_log_file.name = audit_log_file
> appender.audit_log_file.fileName = ${sys:artemis.instance}/log/audit.log
> appender.audit_log_file.filePattern = 
> ${sys:artemis.instance}/log/audit.log.%d{-MM-dd}
> appender.audit_log_file.layout.type = PatternLayout
> appender.audit_log_file.layout.pattern = %d [AUDIT](%t) %msg%n
> appender.audit_log_file.policies.type = Policies
> appender.audit_log_file.policies.cron.type = CronTriggeringPolicy
> appender.audit_log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.audit_log_file.policies.cron.evaluateOnStartup = true{code}
> This results in a new log file every day if there is any logging output. 
> These files are never deleted and keep accumulating.
> After setting a limit of 5 files it looks like this:
> {code:java}
> # Log file appender
> appender.log_file.type = RollingFile
> appender.log_file.name = log_file
> appender.log_file.fileName = ${sys:artemis.instance}/log/artemis.log
> appender.log_file.filePattern = 
> ${sys:artemis.instance}/log/artemis.log.%d{-MM-dd}
> appender.log_file.layout.type = PatternLayout
> appender.log_file.layout.pattern = %d %-5level [%logger] %msg%n
> appender.log_file.policies.type = Policies
> appender.log_file.policies.cron.type = CronTriggeringPolicy
> appender.log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.log_file.policies.cron.evaluateOnStartup = true
> appender.log_file.strategy.type = DefaultRolloverStrategy
> appender.log_file.strategy.max = 5
> # Audit log file appender
> appender.audit_log_file.type = RollingFile
> appender.audit_log_file.name = audit_log_file
> appender.audit_log_file.fileName = ${sys:artemis.instance}/log/audit.log
> appender.audit_log_file.filePattern = 
> ${sys:artemis.instance}/log/audit.log.%d{-MM-dd}
> appender.audit_log_file.layout.type = PatternLayout
> appender.audit_log_file.layout.pattern = %d [AUDIT](%t) %msg%n
> appender.audit_log_file.policies.type = Policies
> appender.audit_log_file.policies.cron.type = CronTriggeringPolicy
> appender.audit_log_file.policies.cron.schedule = 0 0 0 * * ?
> appender.audit_log_file.policies.cron.evaluateOnStartup = true
> appender.audit_log_file.strategy.type = DefaultRolloverStrategy
> appender.audit_log_file.strategy.max = 5 {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)