1 23 package com.sun.enterprise.logging; 24 25 import java.util.Hashtable ; 26 import java.util.logging.Logger ; 27 28 31 public class LogDomains { 32 33 34 private static final String DOMAIN_ROOT = "javax.enterprise."; 35 36 public static final String AVK_VERIFIER_LOGGER = 37 DOMAIN_ROOT + "system.tools.avk.tools.verifier"; 38 39 public static final String AVK_APPVERIFICATION_LOGGER = 40 DOMAIN_ROOT + "system.tools.avk.appverification"; 41 42 public static final String AVK_APPVERIFICATION_TOOLS_LOGGER = 43 DOMAIN_ROOT + "system.tools.avk.appverification.tools"; 44 45 public static final String AVK_APPVERIFICATION_XML_LOGGER = 46 DOMAIN_ROOT + "system.tools.avk.appverification.xml"; 47 48 50 private static final String PACKAGE_ROOT = "com.sun.enterprise."; 51 52 private static final String AVK_VERIFIER_BUNDLE = 53 PACKAGE_ROOT + "tools.verifier.LocalStrings"; 54 55 private static final String AVK_APPVERIFICATION_BUNDLE = 58 PACKAGE_ROOT + "appverification.LocalStrings"; 59 60 private static final String AVK_APPVERIFICATION_TOOLS_BUNDLE = 61 PACKAGE_ROOT + "appverification.tools.LocalStrings"; 62 63 private static final String AVK_APPVERIFICATION_XML_BUNDLE = 64 PACKAGE_ROOT + "appverification.xml.LocalStrings"; 65 66 private static Hashtable <String , Logger > loggers = null; 68 69 static { 71 loggers = new Hashtable <String , Logger >(); 72 loggers.put(AVK_VERIFIER_LOGGER, 73 Logger.getLogger(AVK_VERIFIER_LOGGER, 74 AVK_VERIFIER_BUNDLE)); 75 try { 78 loggers.put(AVK_APPVERIFICATION_LOGGER, 79 Logger.getLogger(AVK_APPVERIFICATION_LOGGER, 80 AVK_APPVERIFICATION_BUNDLE)); 81 loggers.put(AVK_APPVERIFICATION_TOOLS_LOGGER, 82 Logger.getLogger(AVK_APPVERIFICATION_TOOLS_LOGGER, 83 AVK_APPVERIFICATION_TOOLS_BUNDLE)); 84 loggers.put(AVK_APPVERIFICATION_XML_LOGGER, 85 Logger.getLogger(AVK_APPVERIFICATION_XML_LOGGER, 86 AVK_APPVERIFICATION_XML_BUNDLE)); 87 }catch(Exception e) { 88 } 90 } 91 92 private LogDomains() {} 94 public static Logger getLogger(String name) { 95 return (Logger ) loggers.get(name); 96 } 97 98 } 99 | Popular Tags |