Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The log now contains a lot of "noise" caused by navigation through the GUI, preparing the operation, etc. We usually do not need that. And if all that is in the logs it makes it difficult for us to find the exact point when the problematic operation started. Therefore the best strategy is to get rid of that noise entirely. The logfiles are usually in the logs subdirectory of your application server. The logfile of midpoint is idmmidpoint.log.

But it is a bit tricky. The server has the logfile still open. If you are on UNIX-like system it just cannot be deleted as the server will still write to the deleted file. The usual trick is to trim the file, reducing its size to zero. There are several commands that can be used in UNIX to do it. Choose any one that you like:

Code Block
none
none
cp /dev/null idmmidpoint.log
Code Block
none
none
echo -n > idmmidpoint.log

On MS Windows systems with PowerShell installed it is possible to use the following:

Code Block
powershell clear-content idmmidpoint.log

If there's no PowerShell, you can use the following Java code, found e.g. in the Log Viewer Utilities package:

Code Block
public static void main(String[] args) throws IOException {
    RandomAccessFile file = new RandomAccessFile("idmmidpoint.log", "rw");
    file.setLength(0);
    file.close();
    System.out.println("Done.");
}

...