Author: borges
Date: 2012-02-23 04:39:51 -0500 (Thu, 23 Feb 2012)
New Revision: 12176
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerInfo.java
Log:
Use %n for newline with String.format(.)
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerInfo.java
===================================================================
---
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerInfo.java 2012-02-23
09:39:34 UTC (rev 12175)
+++
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerInfo.java 2012-02-23
09:39:51 UTC (rev 12176)
@@ -62,14 +62,14 @@
ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
StringBuilder info = new StringBuilder("\n**** Server Dump ****\n");
- info.append(String.format("date: %s\n", new Date()));
- info.append(String.format("free memory: %s\n",
SizeFormatterUtil.sizeof(freeMemory)));
- info.append(String.format("max memory: %s\n",
SizeFormatterUtil.sizeof(maxMemory)));
- info.append(String.format("total memory: %s\n",
SizeFormatterUtil.sizeof(totalMemory)));
- info.append(String.format("available memory: %.2f%%\n",
availableMemoryPercent));
+ info.append(String.format("date: %s%n", new Date()));
+ info.append(String.format("free memory: %s%n",
SizeFormatterUtil.sizeof(freeMemory)));
+ info.append(String.format("max memory: %s%n",
SizeFormatterUtil.sizeof(maxMemory)));
+ info.append(String.format("total memory: %s%n",
SizeFormatterUtil.sizeof(totalMemory)));
+ info.append(String.format("available memory: %.2f%%%n",
availableMemoryPercent));
info.append(appendPagingInfos());
- info.append(String.format("# of thread: %d\n",
threadMXBean.getThreadCount()));
- info.append(String.format("# of conns: %d\n",
server.getConnectionCount()));
+ info.append(String.format("# of thread: %d%n",
threadMXBean.getThreadCount()));
+ info.append(String.format("# of conns: %d%n",
server.getConnectionCount()));
info.append("********************\n");
return info.toString();
}
@@ -84,14 +84,14 @@
try
{
pageStore = pagingManager.getPageStore(storeName);
- info.append(String.format("\t%s: %s\n",
+ info.append(String.format("\t%s: %s%n",
storeName,
SizeFormatterUtil.sizeof(pageStore.getPageSizeBytes() *
pageStore.getNumberOfPages())));
}
catch (Exception e)
{
- info.append(String.format("\t%s: %s\n", storeName,
e.getMessage()));
+ info.append(String.format("\t%s: %s%n", storeName,
e.getMessage()));
}
}
return info.toString();
Show replies by date