Copilot commented on code in PR #12967:
URL: https://github.com/apache/cloudstack/pull/12967#discussion_r3086889163


##########
server/conf/log4j-cloud.xml.in:
##########
@@ -62,60 +66,84 @@ under the License.
          <PatternLayout pattern="%-5p [%c{1.}] (%t:%x) %m%ex%n"/>
       </Syslog>
 
+
       <!-- ============================== -->
       <!-- Append messages to the console -->
       <!-- ============================== -->
 
+
       <Console name="CONSOLE" target="SYSTEM_OUT">
-         <ThresholdFilter level="OFF" onMatch="ACCEPT" onMismatch="DENY"/>
-         <PatternLayout pattern="%-5p [%c{1.}] (%t:%x) %m%ex%n"/>
+         <ThresholdFilter level="ERROR" onMatch="DENY" onMismatch="ACCEPT"/>
+         <PatternLayout pattern="%d{DEFAULT} %-5p [%c{1.}] (%t:%x) %m%ex%n"/>
+      </Console>
+
+      <Console name="CONSOLE_ERR" target="SYSTEM_ERR">
+         <ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
+         <PatternLayout pattern="%d{DEFAULT} %-5p [%c{1.}] (%t:%x) %m%ex%n"/>

Review Comment:
   With the new ThresholdFilter on CONSOLE (ERROR => DENY), ERROR/FATAL events 
will no longer be emitted to SYSTEM_OUT, so they will disappear from the 
systemd-captured *.out stream and only appear in *.err via CONSOLE_ERR. If the 
intent is only to add timestamps to *.err (without changing stdout content), 
consider keeping CONSOLE accepting all levels and adding CONSOLE_ERR for 
ERROR+, accepting the duplication, or otherwise documenting this behavior 
change.



##########
client/conf/log4j-cloud.xml.in:
##########
@@ -8,8 +8,10 @@ to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at
 
+
   http://www.apache.org/licenses/LICENSE-2.0
 
+
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an

Review Comment:
   This change introduces multiple blank-line-only edits (e.g., extra empty 
lines around the license header and between sections). Consider minimizing 
whitespace-only churn to keep diffs focused and reduce future merge/conflict 
noise.



##########
client/conf/log4j-cloud.xml.in:
##########
@@ -46,89 +51,122 @@ under the License.
          <PatternLayout pattern="%d{DEFAULT} %-5p [%c{1.}] (%t:%x) 
(logid:%X{logcontextid}) %m%ex{filters(${filters})}%n"/>
       </RollingFile>
 
+
       <!-- ============================== -->
       <!-- Append warnings+ to the syslog if it is listening on UDP port -->
       <!-- ============================== -->
 
+
       <Syslog name="SYSLOG" host="localhost" facility="LOCAL6">
          <ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="DENY"/>
          <PatternLayout pattern="%d{DEFAULT} %-5p [%c{1.}] (%t:%x) 
(logid:%X{logcontextid}) %m%ex{filters(${filters})}%n"/>
       </Syslog>
 
+
       <!-- ============================== -->
       <!-- Append alerts to the syslog if it is configured -->
       <!-- ============================== -->
 
+
       <AlertSyslogAppender name="ALERTSYSLOG" syslogHosts="" facility="LOCAL6">
          <ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="DENY"/>
          <PatternLayout pattern="%d{DEFAULT} %-5p [%c{1.}] (%t:%x) 
(logid:%X{logcontextid}) %m%ex{filters(${filters})}%n"/>
       </AlertSyslogAppender>
 
+
       <!-- ============================== -->
       <!-- Append messages to the console -->
       <!-- ============================== -->
 
+
       <Console name="CONSOLE" target="SYSTEM_OUT">
-         <ThresholdFilter level="OFF" onMatch="ACCEPT" onMismatch="DENY"/>
-         <PatternLayout pattern="%-5p [%c{1.}] (%t:%x) 
(logid:%X{logcontextid}) %m%ex{filters(${filters})}%n"/>
+         <ThresholdFilter level="ERROR" onMatch="DENY" onMismatch="ACCEPT"/>
+         <PatternLayout pattern="%d{DEFAULT} %-5p [%c{1.}] (%t:%x) 
(logid:%X{logcontextid}) %m%ex{filters(${filters})}%n"/>
       </Console>
 
+      <Console name="CONSOLE_ERR" target="SYSTEM_ERR">
+         <ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
+         <PatternLayout pattern="%d{DEFAULT} %-5p [%c{1.}] (%t:%x) 
(logid:%X{logcontextid}) %m%ex{filters(${filters})}%n"/>
+      </Console>

Review Comment:
   With the new ThresholdFilter on CONSOLE (ERROR => DENY), ERROR/FATAL events 
will no longer be emitted to SYSTEM_OUT, so they will disappear from the 
systemd-captured *.out stream and only appear in *.err via CONSOLE_ERR. If the 
intent is only to add timestamps to *.err (without changing stdout content), 
consider keeping CONSOLE accepting all levels and adding CONSOLE_ERR for 
ERROR+, accepting the duplication, or otherwise documenting this behavior 
change.



##########
server/conf/log4j-cloud.xml.in:
##########
@@ -8,8 +8,10 @@ to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at
 
+
   http://www.apache.org/licenses/LICENSE-2.0
 
+
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an

Review Comment:
   This change introduces multiple blank-line-only edits (e.g., extra empty 
lines around the license header and between sections). Consider minimizing 
whitespace-only churn to keep diffs focused and reduce future merge/conflict 
noise.



##########
usage/conf/log4j-cloud_usage.xml.in:
##########
@@ -20,19 +20,23 @@ under the License.
 <Configuration monitorInterval="60">
    <Appenders>
 
-       <!-- ============================== -->
-       <!-- Append messages to the console -->
-       <!-- ============================== -->
+      <!-- ============================== -->
+      <!-- Append messages to the console -->
+      <!-- ============================== -->
 
-       <Console name="CONSOLE" target="SYSTEM_OUT">
-          <ThresholdFilter level="OFF" onMatch="ACCEPT" onMismatch="DENY"/>
-          <PatternLayout pattern="%d{ABSOLUTE}{GMT} %5p %c{1}:%L - %m%ex%n"/>
-       </Console>
+      <Console name="CONSOLE" target="SYSTEM_OUT">
+         <ThresholdFilter level="ERROR" onMatch="DENY" onMismatch="ACCEPT"/>
+         <PatternLayout pattern="%d{ABSOLUTE}{GMT} %5p %c{1}:%L - %m%ex%n"/>
+      </Console>
 
+      <Console name="CONSOLE_ERR" target="SYSTEM_ERR">
+         <ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
+         <PatternLayout pattern="%d{ABSOLUTE}{GMT} %5p %c{1}:%L - %m%ex%n"/>
+      </Console>

Review Comment:
   PR description says the change updates the CONSOLE PatternLayout in 
client/server/agent configs and that the console patterns now include 
%d{DEFAULT}. This PR also changes the Usage config 
(usage/conf/log4j-cloud_usage.xml.in) and it uses %d{ABSOLUTE}{GMT} for console 
output. Please update the PR description to reflect the additional file and the 
actual patterns used so it matches what’s merged.



##########
agent/conf/log4j-cloud.xml.in:
##########
@@ -8,8 +8,10 @@ to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at
 
+
   http://www.apache.org/licenses/LICENSE-2.0
 
+
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an

Review Comment:
   This change introduces multiple blank-line-only edits (e.g., extra empty 
lines around the license header and between sections). Consider minimizing 
whitespace-only churn to keep diffs focused and reduce future merge/conflict 
noise.



##########
agent/conf/log4j-cloud.xml.in:
##########
@@ -33,44 +37,52 @@ under the License.
          <PatternLayout pattern="%d{DEFAULT} %-5p [%c{3}] (%t:%x) 
(logid:%X{logcontextid}) %m%ex%n"/>
       </RollingFile>
 
+
       <!-- ============================== -->
       <!-- Append messages to the console -->
       <!-- ============================== -->
 
+
       <Console name="CONSOLE" target="SYSTEM_OUT">
-          <ThresholdFilter level="OFF" onMatch="ACCEPT" onMismatch="DENY"/>
-          <PatternLayout pattern="%-5p [%c{3}] (%t:%x) 
(logid:%X{logcontextid}) %m%ex%n"/>
+         <ThresholdFilter level="ERROR" onMatch="DENY" onMismatch="ACCEPT"/>
+         <PatternLayout pattern="%d{DEFAULT} %-5p [%c{3}] (%t:%x) 
(logid:%X{logcontextid}) %m%ex%n"/>
+      </Console>
+
+      <Console name="CONSOLE_ERR" target="SYSTEM_ERR">
+         <ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
+         <PatternLayout pattern="%d{DEFAULT} %-5p [%c{3}] (%t:%x) 
(logid:%X{logcontextid}) %m%ex%n"/>
       </Console>

Review Comment:
   With the new ThresholdFilter on CONSOLE (ERROR => DENY), ERROR/FATAL events 
will no longer be emitted to SYSTEM_OUT, so they will disappear from the 
systemd-captured *.out stream and only appear in *.err via CONSOLE_ERR. If the 
intent is only to add timestamps to *.err (without changing stdout content), 
consider keeping CONSOLE accepting all levels and adding CONSOLE_ERR for 
ERROR+, accepting the duplication, or otherwise documenting this behavior 
change.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to