Changeset 1318 for trunk/java-utils/src/main/java/de/ugoe/cs/util
- Timestamp:
- 11/01/13 14:39:10 (11 years ago)
- Location:
- trunk/java-utils/src/main/java/de/ugoe/cs/util/console
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/java-utils/src/main/java/de/ugoe/cs/util/console/Console.java
r927 r1318 436 436 @Deprecated 437 437 public static void trace(String traceMsg) { 438 for (ITraceListener observer : theInstance.traceListener) { 439 observer.traceMsg(traceMsg, Level.INFO); 440 } 438 trace(Level.INFO, traceMsg); 441 439 } 442 440 … … 468 466 @Deprecated 469 467 public static void traceln(String traceMsg) { 470 for (ITraceListener observer : theInstance.traceListener) { 471 observer.traceMsg(traceMsg + StringTools.ENDLINE, Level.INFO); 472 } 468 trace(Level.INFO, traceMsg + StringTools.ENDLINE); 473 469 } 474 470 … … 484 480 */ 485 481 public static void traceln(Level logLevel, String traceMsg) { 486 for( ITraceListener observer : theInstance.traceListener) { 487 observer.traceMsg(traceMsg + StringTools.ENDLINE, logLevel); 488 } 482 trace(logLevel, traceMsg + StringTools.ENDLINE); 489 483 } 490 484 -
trunk/java-utils/src/main/java/de/ugoe/cs/util/console/TextConsole.java
r927 r1318 17 17 import java.io.IOException; 18 18 import java.nio.charset.Charset; 19 import java.text.SimpleDateFormat; 20 import java.util.Date; 19 21 import java.util.logging.Level; 20 22 … … 40 42 */ 41 43 private Level traceLevel; 44 45 private final SimpleDateFormat ft = new SimpleDateFormat("HH:mm:ss"); 42 46 43 47 /** … … 108 112 public void traceMsg(String traceMessage, Level level) { 109 113 if (level.intValue()>=traceLevel.intValue()) { 110 System.out.print("[" + level.toString() + "] " + traceMessage);114 System.out.print("[" + level.toString() + "] [" + ft.format(new Date()) + "] " + traceMessage); 111 115 } 112 116 }
Note: See TracChangeset
for help on using the changeset viewer.