Index: Project.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
retrieving revision 1.93
diff -u -w -r1.93 Project.java
--- Project.java	2 Feb 2002 12:52:00 -0000	1.93
+++ Project.java	12 Feb 2002 04:01:12 -0000
@@ -86,8 +86,9 @@
     public final static int MSG_ERR = 0;
     public final static int MSG_WARN = 1;
     public final static int MSG_INFO = 2;
-    public final static int MSG_VERBOSE = 3;
-    public final static int MSG_DEBUG = 4;
+    public final static int MSG_DEPRECATED = 3;
+    public final static int MSG_VERBOSE = 4;
+    public final static int MSG_DEBUG = 5;
 
     // private set of constants to represent the state
     // of a DFS of the Target dependencies



Index: Main.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Main.java,v
retrieving revision 1.56
diff -u -w -r1.56 Main.java
--- Main.java	2 Feb 2002 00:13:32 -0000	1.56
+++ Main.java	12 Feb 2002 04:02:01 -0000
@@ -204,6 +204,9 @@
                 return;
             } else if (arg.equals("-quiet") || arg.equals("-q")) {
                 msgOutputLevel = Project.MSG_WARN;
+            } else if (arg.equals("-deprecated")) {
+                printVersion();
+                msgOutputLevel = Project.MSG_DEPRECATED;
             } else if (arg.equals("-verbose") || arg.equals("-v")) {
                 printVersion();
                 msgOutputLevel = Project.MSG_VERBOSE;
@@ -614,6 +617,7 @@
         msg.append("  -projecthelp           print project help information" + lSep);
         msg.append("  -version               print the version information and exit" + lSep);
         msg.append("  -quiet                 be extra quiet" + lSep);
+        msg.append("  -deprecated            show deprecated messages" + lSep);
         msg.append("  -verbose               be extra verbose" + lSep);
         msg.append("  -debug                 print debugging information" + lSep);
         msg.append("  -emacs                 produce logging information without adornments" + lSep);




Index: DefaultLogger.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/DefaultLogger.java,v
retrieving revision 1.32
diff -u -w -r1.32 DefaultLogger.java
--- DefaultLogger.java	5 Feb 2002 21:38:25 -0000	1.32
+++ DefaultLogger.java	12 Feb 2002 04:02:29 -0000
@@ -73,6 +73,7 @@
     protected PrintStream err;
     protected int msgOutputLevel = Project.MSG_ERR;
     private long startTime = System.currentTimeMillis();
+    private boolean isDeprecatedUsed;
 
     /** line separator */
     protected final static String lSep = StringUtils.LINE_SEP;
@@ -137,6 +138,11 @@
         Throwable error = event.getException();
         StringBuffer message = new StringBuffer();
 
+        if (isDeprecatedUsed && msgOutputLevel < Project.MSG_DEPRECATED) {
+            message.append(StringUtils.LINE_SEP);
+            message.append("Deprecated features used.");
+        }
+
         if (error == null) {
             message.append(StringUtils.LINE_SEP);
             message.append("BUILD SUCCESSFUL");
@@ -178,6 +184,10 @@
             printMessage(msg, out, event.getPriority());
             log(msg);
         }
+        if (!isDeprecatedUsed
+                && Project.MSG_DEPRECATED == event.getPriority()) {
+            isDeprecatedUsed = true;
+        }
     }
 
     public void targetFinished(BuildEvent event) {
@@ -188,6 +198,10 @@
 
     public void messageLogged(BuildEvent event) {
         int priority = event.getPriority();
+        if (!isDeprecatedUsed
+                && Project.MSG_DEPRECATED == priority) {
+            isDeprecatedUsed = true;
+        }
         // Filter out messages based on priority
         if (priority <= msgOutputLevel) {
 

