Skip to content

Commit

Permalink
Common: Disable Sonar logger HotSpots
Browse files Browse the repository at this point in the history
Disable SonarCloud logger flags related to [1]'s HotSpots issue.

[1] https://sonarcloud.io/organizations/eclipse/rules?open=java%3AS4792&rule_key=java%3AS4792

Change-Id: I8c1dbf01c7c7a28506050de031c5f58a996b7cef
Signed-off-by: Estelle Foisy <estelle.foisy@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/200957
Reviewed-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
  • Loading branch information
Estelle Foisy authored and MatthewKhouzam committed Apr 5, 2023
1 parent 46d93f9 commit 0fe07f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -34,7 +34,7 @@ public final class TraceCompassLog {
String loggingProperty = System.getProperty(LOGGING_PROPERTY);
if (!"true".equals(loggingProperty)) { //$NON-NLS-1$
TC_PARENT_LOGGER.setUseParentHandlers(false);
TC_PARENT_LOGGER.setLevel(Level.OFF);
TC_PARENT_LOGGER.setLevel(Level.OFF); // NOSONAR
}
}

Expand Down
Expand Up @@ -57,7 +57,7 @@ public TraceCompassMonitor(String label) {
* which doesn't output any such breaking strings. Finer logging for
* this package isn't necessary anyway here.
*/
Logger.getLogger("javax.management").setLevel(Level.FINE); //$NON-NLS-1$
Logger.getLogger("javax.management").setLevel(Level.FINE); //$NON-NLS-1$ NOSONAR
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
String beanName = "org.eclipse.tracecompass.common.core.log:type=TraceCompassMonitoring,name=" + label.replace(':', '-'); //$NON-NLS-1$
try {
Expand Down

0 comments on commit 0fe07f5

Please sign in to comment.