Skip to content

Commit

Permalink
#2691 Fix Usage.log path and name in Linux/macOS
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
Signed-off-by: Philippe DUL <philippe.dul@thalesgroup.com>
  • Loading branch information
mPorhel authored and pdulth committed Aug 10, 2023
1 parent c94f17b commit e225216
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*******************************************************************************/
package org.polarsys.capella.common.tools.report.appenders.usage.util;

import java.io.File;
import java.io.IOException;

import org.apache.log4j.RollingFileAppender;
Expand All @@ -25,7 +26,7 @@ public UsageAppender() throws IOException {
super(new UsageLayout(), getFileName());
setMaxFileSize("20MB");
setMaxBackupIndex(30);

addFilter(new Filter() {
@Override
public int decide(LoggingEvent arg0) {
Expand All @@ -35,6 +36,6 @@ public int decide(LoggingEvent arg0) {
}

private static String getFileName() {
return System.getProperty(UsageMonitoringLogger.USAGE_PATH)+ "\\Usage.log";
return System.getProperty(UsageMonitoringLogger.USAGE_PATH) + File.separator + "Usage.log";
}
}

0 comments on commit e225216

Please sign in to comment.