1 23 package com.sun.enterprise.tools.deployment.main; 24 25 import java.io.PrintStream ; 26 import com.sun.enterprise.util.LocalStringManagerImpl; 27 28 29 32 33 public class Log { 34 private static PrintStream out = System.out; 35 public static boolean test = true; 36 private static LocalStringManagerImpl localStrings = 37 new LocalStringManagerImpl(Log.class); 38 39 40 public static void print(Object sender, Object o) { 41 if (o instanceof Throwable ) { 42 out.println(((Throwable ) o).getMessage()); 43 ((Throwable ) o).printStackTrace(out); 44 out.println(localStrings.getLocalString( 45 "enterprise.tools.deployment.main.senderwas", 46 "Sender was {0}", new Object [] {sender})); 47 } else { 48 out.println(localStrings.getLocalString( 49 "enterprise.tools.deployment.main.sender", 50 "Sender object {0} : {1}", new Object [] {sender, o})); 51 } 52 } 53 54 } 55 | Popular Tags |