From df70c1635d827d0d715f01e3e839c822f6892837 Mon Sep 17 00:00:00 2001 From: Vishesh Date: Thu, 24 Oct 2024 13:43:08 +0530 Subject: [PATCH] log4j2: Use size based triggering instead of time based --- agent/conf/log4j-cloud.xml.in | 5 +++-- build/replace.properties | 2 ++ client/conf/log4j-cloud.xml.in | 10 ++++++---- packaging/debian/replace.properties | 2 ++ packaging/el8/replace.properties | 2 ++ plugins/hypervisors/hyperv/conf/log4j-cloud.xml.in | 5 +++-- server/conf/log4j-cloud.xml.in | 10 ++++++---- usage/conf/log4j-cloud_usage.xml.in | 5 +++-- 8 files changed, 27 insertions(+), 14 deletions(-) diff --git a/agent/conf/log4j-cloud.xml.in b/agent/conf/log4j-cloud.xml.in index 84957edca032..6a55dbe7a339 100644 --- a/agent/conf/log4j-cloud.xml.in +++ b/agent/conf/log4j-cloud.xml.in @@ -25,10 +25,11 @@ under the License. - + + - + diff --git a/build/replace.properties b/build/replace.properties index ce38727b80a7..61806da51999 100644 --- a/build/replace.properties +++ b/build/replace.properties @@ -20,6 +20,8 @@ DBPW=cloud DBROOTPW= MSLOG=vmops.log APISERVERLOG=api.log +LOGMAXINDEX=10 +LOGMAXFILESIZE=104857600 DBHOST=localhost DBDRIVER=jdbc:mysql AGENTLOGDIR=logs diff --git a/client/conf/log4j-cloud.xml.in b/client/conf/log4j-cloud.xml.in index 26da171269de..2bdae79c1379 100755 --- a/client/conf/log4j-cloud.xml.in +++ b/client/conf/log4j-cloud.xml.in @@ -29,19 +29,21 @@ under the License. - + + - + - + + - + diff --git a/packaging/debian/replace.properties b/packaging/debian/replace.properties index db88310d81cd..b67cf6f4f23e 100644 --- a/packaging/debian/replace.properties +++ b/packaging/debian/replace.properties @@ -43,6 +43,8 @@ MSCONF=/etc/cloudstack/management MSENVIRON=/usr/share/cloudstack-management MSLOG=/var/log/cloudstack/management/management-server.log MSLOGDIR=/var/log/cloudstack/management/ +LOGMAXINDEX=10 +LOGMAXFILESIZE=104857600 MSMNTDIR=/var/lib/cloudstack/mnt MSUSER=cloud PIDDIR=/var/run diff --git a/packaging/el8/replace.properties b/packaging/el8/replace.properties index efeab01166ea..8c94aa3e995b 100644 --- a/packaging/el8/replace.properties +++ b/packaging/el8/replace.properties @@ -43,6 +43,8 @@ MSCONF=/etc/cloudstack/management MSENVIRON=/usr/share/cloudstack-management MSLOG=/var/log/cloudstack/management/management-server.log MSLOGDIR=/var/log/cloudstack/management/ +LOGMAXINDEX=10 +LOGMAXFILESIZE=104857600 MSMNTDIR=/var/cloudstack/mnt MSUSER=cloud PIDDIR=/var/run diff --git a/plugins/hypervisors/hyperv/conf/log4j-cloud.xml.in b/plugins/hypervisors/hyperv/conf/log4j-cloud.xml.in index 104e52233a9e..47c3c2327969 100644 --- a/plugins/hypervisors/hyperv/conf/log4j-cloud.xml.in +++ b/plugins/hypervisors/hyperv/conf/log4j-cloud.xml.in @@ -25,10 +25,11 @@ under the License. - + + - + diff --git a/server/conf/log4j-cloud.xml.in b/server/conf/log4j-cloud.xml.in index 9a8e5dc7bf33..e4287a410d56 100755 --- a/server/conf/log4j-cloud.xml.in +++ b/server/conf/log4j-cloud.xml.in @@ -26,10 +26,11 @@ under the License. - + + - + @@ -44,10 +45,11 @@ under the License. - + + - + diff --git a/usage/conf/log4j-cloud_usage.xml.in b/usage/conf/log4j-cloud_usage.xml.in index 871d6fb5a7a6..ce836b90a9ea 100644 --- a/usage/conf/log4j-cloud_usage.xml.in +++ b/usage/conf/log4j-cloud_usage.xml.in @@ -34,10 +34,11 @@ under the License. - + + - +