1 23 24 33 34 package com.sun.enterprise.deployment.backend; 35 36 import com.sun.logging.LogDomains; 37 import java.util.logging.*; 38 39 42 public class DeploymentLogger 43 { 44 public final static Logger get() 45 { 46 return logger; 48 } 49 50 52 private DeploymentLogger() 53 { 54 } 55 56 58 59 private static Logger logger = null; 60 61 static 62 { 63 try 64 { 65 logger = LogDomains.getLogger(LogDomains.DPL_LOGGER); 66 logger.finest("Successfully created Deployment Logger"); 67 } 68 catch(Throwable t) 69 { 70 try 71 { 72 logger = LogDomains.getLogger(LogDomains.ROOT_LOGGER); 73 logger.warning("Couldn't create Deployment Logger -- created a Root Logger instead"); 74 } 75 catch(Throwable t2) 76 { 77 } 79 } 80 } 81 public static void main(String [] args) 82 { 83 logger.setLevel(Level.FINEST); 84 logger.info("dadads"); 85 logger.log(Level.INFO, "info", new String [] {"Yo", "ewe" }); 86 logger.log(Level.FINE, "fine", new String [] {"Yo", "ewe" }); 87 } 88 } 89 94 95 | Popular Tags |