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:26:34 UTC
svn commit: r1090536 -
/karaf/trunk/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java
Author: pieber
Date: Sat Apr 9 07:26:34 2011
New Revision: 1090536
URL: http://svn.apache.org/viewvc?rev=1090536&view=rev
Log:
[KARAF-461] Fixed dmp output name to yyyy-MM-dd_HHmmss.zip
Modified:
karaf/trunk/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java
Modified: karaf/trunk/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java
URL: http://svn.apache.org/viewvc/karaf/trunk/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java?rev=1090536&r1=1090535&r2=1090536&view=diff
==============================================================================
--- karaf/trunk/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java (original)
+++ karaf/trunk/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java Sat Apr 9 07:26:34 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";
}