You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by pi...@apache.org on 2011/04/09 09:24:08 UTC

svn commit: r1090535 - /karaf/branches/karaf-2.2.x/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java

Author: pieber
Date: Sat Apr  9 07:24:07 2011
New Revision: 1090535

URL: http://svn.apache.org/viewvc?rev=1090535&view=rev
Log:
[KARAF-461] Fixed dmp output name to yyyy-MM-dd_HHmmss.zip

Signed-off-by: Andreas Pieber <an...@gmail.com>

Modified:
    karaf/branches/karaf-2.2.x/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java

Modified: karaf/branches/karaf-2.2.x/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java?rev=1090535&r1=1090534&r2=1090535&view=diff
==============================================================================
--- karaf/branches/karaf-2.2.x/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java (original)
+++ karaf/branches/karaf-2.2.x/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java Sat Apr  9 07:24:07 2011
@@ -45,6 +45,11 @@ public class DumpCommand extends OsgiCom
     private List<DumpProvider> providers = new LinkedList<DumpProvider>();
 
     /**
+     * Output format of the filename if not defined otherwise
+     */
+    private SimpleDateFormat dumpFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmss");
+
+    /**
      * Directory switch.
      */
     @Option(name = "-d", aliases = "--directory", description = "Creates dump in directory instead ZIP")
@@ -67,7 +72,7 @@ public class DumpCommand extends OsgiCom
 
         // create default file name if none provided
         if (fileName == null || fileName.trim().length() == 0) {
-            fileName = SimpleDateFormat.getDateTimeInstance().format(new Date());
+            fileName = dumpFormat.format(new Date());
             if (!directory) {
                 fileName += ".zip";
             }