From 455897cc245b67d929f409a93cfa7106e835cc1f Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Thu, 01 Mar 2007 03:27:06 +0000
Subject: [PATCH] This removes old debug logging framework method calls that are going to be automatically instrumented by AspectJ. Non instrumented debug method calls are updated to use the new debug framework methods. However, the new debug logging framework is not yet active as the Aspects are not weaved in. After this revision, debug logging will be disabled in the server until the new AOP framework is complete.
---
opends/src/server/org/opends/server/loggers/FileNumberRetentionPolicy.java | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/opends/src/server/org/opends/server/loggers/FileNumberRetentionPolicy.java b/opends/src/server/org/opends/server/loggers/FileNumberRetentionPolicy.java
index 6908ae3..f03f7cb 100644
--- a/opends/src/server/org/opends/server/loggers/FileNumberRetentionPolicy.java
+++ b/opends/src/server/org/opends/server/loggers/FileNumberRetentionPolicy.java
@@ -22,23 +22,19 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
import java.io.File;
import java.util.Arrays;
-import static org.opends.server.loggers.Debug.*;
-
/**
* This class implements a retention policy based on the number of files.
* Files will be cleaned up based on the number of files on disk.
*/
public class FileNumberRetentionPolicy implements RetentionPolicy
{
- private static final String CLASS_NAME =
- "org.opends.server.loggers.FileNumberRetentionPolicy";
private int numFiles = 0;
private File directory = null;
@@ -53,8 +49,7 @@
*/
public FileNumberRetentionPolicy(String dir, String prefix, int numFiles)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dir),
- String.valueOf(prefix), String.valueOf(numFiles));
+
this.numFiles = numFiles;
this.directory = new File(dir);
this.prefix = prefix;
@@ -68,11 +63,11 @@
*/
public int deleteFiles()
{
- assert debugEnter(CLASS_NAME, "deleteFiles");
+
int count = 0;
File[] selectedFiles = directory.listFiles(new LogFileFilter(prefix));
- if(selectedFiles.length <= numFiles)
+ if (selectedFiles.length <= numFiles)
{
return 0;
}
@@ -80,7 +75,7 @@
// Sort files based on last modified time.
Arrays.sort(selectedFiles, new FileComparator());
- for(int j = numFiles; j < selectedFiles.length; j++)
+ for (int j = numFiles; j < selectedFiles.length; j++)
{
// System.out.println("Deleting log file:" + selectedFiles[j]);
selectedFiles[j].delete();
--
Gitblit v1.10.0