Skip to content

Commit

Permalink
Revert "[2093] Size of log-monitoring file"
Browse files Browse the repository at this point in the history
This reverts commit 043abf1.

Change-Id: I2e5f264d8dc990fe715b46d7cab1a7f04d30b7a7
  • Loading branch information
pdulth committed Jun 19, 2018
1 parent 043abf1 commit 44b6ddc
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017, 2018 THALES GLOBAL SERVICES.
* Copyright (c) 2017 THALES GLOBAL SERVICES.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -10,11 +10,9 @@
*******************************************************************************/
package org.polarsys.capella.common.tools.report.appenders.usage.util;

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

import org.apache.log4j.RollingFileAppender;
import org.apache.log4j.helpers.CountingQuietWriter;
import org.apache.log4j.spi.Filter;
import org.apache.log4j.spi.LoggingEvent;
import org.polarsys.capella.common.tools.report.appenders.usage.UsageMonitoringLogger;
Expand All @@ -33,20 +31,6 @@ public int decide(LoggingEvent arg0) {
}
});
}

@Override
protected void subAppend(LoggingEvent event) {
// Before appending, update the count if it's needed
if(qw instanceof CountingQuietWriter){
CountingQuietWriter cqw = (CountingQuietWriter)qw;
File f = new File(fileName);
long length = f.length();
if(cqw.getCount() < length){
cqw.setCount(length);
}
}
super.subAppend(event);
}

private static String getFileName() {
return System.getProperty(UsageMonitoringLogger.USAGE_PATH)+ "\\Usage.log";
Expand Down

0 comments on commit 44b6ddc

Please sign in to comment.