KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > logging > LogDomains


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.logging;
24
25 import java.util.logging.Logger JavaDoc;
26
27 /**
28  * Class LogDomains
29  */

30 public class LogDomains
31 {
32
33     /**
34      * DOMAIN_ROOT the prefix for the logger name. This is public only
35      * so it can be accessed w/in the ias package space.
36      */

37     public static final String JavaDoc DOMAIN_ROOT = "javax.";
38
39     /**
40      * PACKAGE_ROOT the prefix for the packages where logger resource
41      * bundles reside. This is public only so it can be accessed w/in
42      * the ias package space.
43      */

44     public static final String JavaDoc PACKAGE_ROOT = "com.sun.logging.";
45
46     /**
47      * RESOURCE_BUNDLE the name of the logging resource bundles.
48      */

49     public static final String JavaDoc RESOURCE_BUNDLE = "LogStrings";
50
51     /**
52      * Field
53      */

54     public static final String JavaDoc TOOLS_LOGGER = DOMAIN_ROOT + "enterprise.system.tools";
55
56     /**
57      * Field
58      */

59     public static final String JavaDoc EJB_LOGGER = DOMAIN_ROOT + "enterprise.system.container.ejb";
60
61     /**
62      * JavaMail Logger
63      */

64     public static final String JavaDoc JAVAMAIL_LOGGER = DOMAIN_ROOT + "enterprise.resource.javamail";
65     
66     /**
67      * IIOP Logger
68     public static final String IIOP_LOGGER = DOMAIN_ROOT + "enterprise.resource.iiop";
69      */

70
71
72     /**
73      * JMS Logger
74      */

75     public static final String JavaDoc JMS_LOGGER = DOMAIN_ROOT + "enterprise.resource.jms";
76
77     /**
78      * Field
79      */

80     public static final String JavaDoc WEB_LOGGER = DOMAIN_ROOT + "enterprise.system.container.web";
81     
82     /**
83      * Field
84      */

85     public static final String JavaDoc CMP_LOGGER = DOMAIN_ROOT + "enterprise.system.container.cmp";
86
87     /**
88      * Field
89      */

90     public static final String JavaDoc JDO_LOGGER = DOMAIN_ROOT + "enterprise.resource.jdo";
91     
92     /**
93      * Field
94      */

95     public static final String JavaDoc ACC_LOGGER = DOMAIN_ROOT + "enterprise.system.container.appclient";
96
97     /**
98      * Field
99      */

100     public static final String JavaDoc MDB_LOGGER = DOMAIN_ROOT + "enterprise.system.container.ejb.mdb";
101
102     /**
103      * Field
104      */

105     public static final String JavaDoc SECURITY_LOGGER = DOMAIN_ROOT + "enterprise.system.core.security";
106
107     /**
108      * Field
109      */

110     public static final String JavaDoc TRANSACTION_LOGGER = DOMAIN_ROOT + "enterprise.system.core.transaction";
111
112     /**
113      * Field
114      */

115     public static final String JavaDoc CORBA_LOGGER = DOMAIN_ROOT + "enterprise.resource.corba";
116
117     /**
118      * Field
119      */

120     public static final String JavaDoc ROOT_LOGGER = DOMAIN_ROOT + "enterprise";
121     /**
122      * Field
123      */

124     //START OF IASRI 4660742
125
/**
126      * Field
127      */

128     public static final String JavaDoc UTIL_LOGGER = DOMAIN_ROOT + "enterprise.system.util";
129     /**
130      * Field
131      */

132     public static final String JavaDoc NAMING_LOGGER = DOMAIN_ROOT + "enterprise.system.core.naming";
133
134     /**
135      * Field
136      */

137     public static final String JavaDoc JNDI_LOGGER = DOMAIN_ROOT + "enterprise.system.core.naming";
138     /**
139      * Field
140      */

141     public static final String JavaDoc APPVERIFY_LOGGER = DOMAIN_ROOT + "enterprise.system.tools.verifier";
142     /**
143      * Field
144      */

145     public static final String JavaDoc ACTIVATION_LOGGER = DOMAIN_ROOT + "enterprise.system.activation";
146     /**
147      * Field
148      */

149     public static final String JavaDoc JTA_LOGGER = DOMAIN_ROOT + "enterprise.resource.jta";
150     
151     /**
152      * Resource Logger
153      */

154     
155     public static final String JavaDoc RSR_LOGGER = DOMAIN_ROOT + "enterprise.resource.resourceadapter";
156     //END OF IASRI 4660742
157

158     /**
159     * Deployment Logger
160     */

161     public static final String JavaDoc DPL_LOGGER = DOMAIN_ROOT + "enterprise.system.tools.deployment";
162
163     /**
164      * Deployment audit logger
165      */

166     public static final String JavaDoc DPLAUDIT_LOGGER = DOMAIN_ROOT + "enterprise.system.tools.deployment.audit";
167     
168     /**
169      * Field
170      */

171     public static final String JavaDoc DIAGNOSTICS_LOGGER = DOMAIN_ROOT + "enterprise.system.tools.diagnostics";
172     
173     /** JAXRPC Logger */
174         public static final String JavaDoc JAXRPC_LOGGER = DOMAIN_ROOT + "enterprise.system.webservices.rpc";
175
176         /** JAXR Logger */
177         public static final String JavaDoc JAXR_LOGGER = DOMAIN_ROOT + "enterprise.system.webservices.registry";
178
179         /** SAAJ Logger */
180         public static final String JavaDoc SAAJ_LOGGER = DOMAIN_ROOT + "enterprise.system.webservices.saaj";
181         
182        /** Self Management Logger */
183        public static final String JavaDoc SELF_MANAGEMENT_LOGGER = DOMAIN_ROOT + "enterprise.system.core.selfmanagement";
184
185     
186     /**
187      * Admin Logger
188     */

189     public static final String JavaDoc ADMIN_LOGGER =
190             DOMAIN_ROOT + "enterprise.system.tools.admin";
191     /** Server Logger */
192     public static final String JavaDoc SERVER_LOGGER= DOMAIN_ROOT + "enterprise.system";
193     /** core Logger */
194     public static final String JavaDoc CORE_LOGGER= DOMAIN_ROOT + "enterprise.system.core";
195     /** classloader Logger */
196     public static final String JavaDoc LOADER_LOGGER= DOMAIN_ROOT + "enterprise.system.core.classloading";
197
198     /** Config Logger */
199     public static final String JavaDoc CONFIG_LOGGER = DOMAIN_ROOT + "enterprise.system.core.config";
200
201     /** Process Launcher Logger */
202     public static final String JavaDoc PROCESS_LAUNCHER_LOGGER = DOMAIN_ROOT + "enterprise.tools.launcher";
203
204     /** GMS Logger */
205     public static final String JavaDoc GMS_LOGGER = DOMAIN_ROOT +"ee.enterprise.system.gms";
206
207
208     /**
209      * This is temporary and needed so that IAS can run with or without
210      * the com.sun.enterprise.server.logging.ServerLogger. The subclassed
211      * addLogger() method there automatically appends the logger name.
212      **/

213     private static String JavaDoc getLoggerResourceBundleName(String JavaDoc loggerName) {
214         String JavaDoc result = loggerName + "." + RESOURCE_BUNDLE;
215         return result.replaceFirst(DOMAIN_ROOT, PACKAGE_ROOT);
216     }
217     
218     /**
219      * Method getLogger
220      *
221      *
222      * @param name
223      *
224      * @return
225      */

226     public static Logger JavaDoc getLogger(String JavaDoc name) {
227         return Logger.getLogger(name, getLoggerResourceBundleName(name));
228     }
229 }
230
Popular Tags