Source Code Cross Referenced for Log.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » juli » logging » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.juli.logging 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        package org.apache.juli.logging;
019:
020:        /**
021:         * <p>A simple logging interface abstracting logging APIs.  In order to be
022:         * instantiated successfully by {@link LogFactory}, classes that implement
023:         * this interface must have a constructor that takes a single String
024:         * parameter representing the "name" of this Log.</p>
025:         *
026:         * <p> The six logging levels used by <code>Log</code> are (in order):
027:         * <ol>
028:         * <li>trace (the least serious)</li>
029:         * <li>debug</li>
030:         * <li>info</li>
031:         * <li>warn</li>
032:         * <li>error</li>
033:         * <li>fatal (the most serious)</li>
034:         * </ol>
035:         * The mapping of these log levels to the concepts used by the underlying
036:         * logging system is implementation dependent.
037:         * The implemention should ensure, though, that this ordering behaves
038:         * as expected.</p>
039:         *
040:         * <p>Performance is often a logging concern.
041:         * By examining the appropriate property,
042:         * a component can avoid expensive operations (producing information
043:         * to be logged).</p>
044:         *
045:         * <p> For example,
046:         * <code><pre>
047:         *    if (log.isDebugEnabled()) {
048:         *        ... do something expensive ...
049:         *        log.debug(theResult);
050:         *    }
051:         * </pre></code>
052:         * </p>
053:         *
054:         * <p>Configuration of the underlying logging system will generally be done
055:         * external to the Logging APIs, through whatever mechanism is supported by
056:         * that system.</p>
057:         *
058:         * @author <a href="mailto:sanders@apache.org">Scott Sanders</a>
059:         * @author Rod Waldhoff
060:         * @version $Id: Log.java 467222 2006-10-24 03:17:11Z markt $
061:         */
062:        public interface Log {
063:
064:            // ----------------------------------------------------- Logging Properties
065:
066:            /**
067:             * <p> Is debug logging currently enabled? </p>
068:             *
069:             * <p> Call this method to prevent having to perform expensive operations
070:             * (for example, <code>String</code> concatenation)
071:             * when the log level is more than debug. </p>
072:             */
073:            public boolean isDebugEnabled();
074:
075:            /**
076:             * <p> Is error logging currently enabled? </p>
077:             *
078:             * <p> Call this method to prevent having to perform expensive operations
079:             * (for example, <code>String</code> concatenation)
080:             * when the log level is more than error. </p>
081:             */
082:            public boolean isErrorEnabled();
083:
084:            /**
085:             * <p> Is fatal logging currently enabled? </p>
086:             *
087:             * <p> Call this method to prevent having to perform expensive operations
088:             * (for example, <code>String</code> concatenation)
089:             * when the log level is more than fatal. </p>
090:             */
091:            public boolean isFatalEnabled();
092:
093:            /**
094:             * <p> Is info logging currently enabled? </p>
095:             *
096:             * <p> Call this method to prevent having to perform expensive operations
097:             * (for example, <code>String</code> concatenation)
098:             * when the log level is more than info. </p>
099:             */
100:            public boolean isInfoEnabled();
101:
102:            /**
103:             * <p> Is trace logging currently enabled? </p>
104:             *
105:             * <p> Call this method to prevent having to perform expensive operations
106:             * (for example, <code>String</code> concatenation)
107:             * when the log level is more than trace. </p>
108:             */
109:            public boolean isTraceEnabled();
110:
111:            /**
112:             * <p> Is warn logging currently enabled? </p>
113:             *
114:             * <p> Call this method to prevent having to perform expensive operations
115:             * (for example, <code>String</code> concatenation)
116:             * when the log level is more than warn. </p>
117:             */
118:            public boolean isWarnEnabled();
119:
120:            // -------------------------------------------------------- Logging Methods
121:
122:            /**
123:             * <p> Log a message with trace log level. </p>
124:             *
125:             * @param message log this message
126:             */
127:            public void trace(Object message);
128:
129:            /**
130:             * <p> Log an error with trace log level. </p>
131:             *
132:             * @param message log this message
133:             * @param t log this cause
134:             */
135:            public void trace(Object message, Throwable t);
136:
137:            /**
138:             * <p> Log a message with debug log level. </p>
139:             *
140:             * @param message log this message
141:             */
142:            public void debug(Object message);
143:
144:            /**
145:             * <p> Log an error with debug log level. </p>
146:             *
147:             * @param message log this message
148:             * @param t log this cause
149:             */
150:            public void debug(Object message, Throwable t);
151:
152:            /**
153:             * <p> Log a message with info log level. </p>
154:             *
155:             * @param message log this message
156:             */
157:            public void info(Object message);
158:
159:            /**
160:             * <p> Log an error with info log level. </p>
161:             *
162:             * @param message log this message
163:             * @param t log this cause
164:             */
165:            public void info(Object message, Throwable t);
166:
167:            /**
168:             * <p> Log a message with warn log level. </p>
169:             *
170:             * @param message log this message
171:             */
172:            public void warn(Object message);
173:
174:            /**
175:             * <p> Log an error with warn log level. </p>
176:             *
177:             * @param message log this message
178:             * @param t log this cause
179:             */
180:            public void warn(Object message, Throwable t);
181:
182:            /**
183:             * <p> Log a message with error log level. </p>
184:             *
185:             * @param message log this message
186:             */
187:            public void error(Object message);
188:
189:            /**
190:             * <p> Log an error with error log level. </p>
191:             *
192:             * @param message log this message
193:             * @param t log this cause
194:             */
195:            public void error(Object message, Throwable t);
196:
197:            /**
198:             * <p> Log a message with fatal log level. </p>
199:             *
200:             * @param message log this message
201:             */
202:            public void fatal(Object message);
203:
204:            /**
205:             * <p> Log an error with fatal log level. </p>
206:             *
207:             * @param message log this message
208:             * @param t log this cause
209:             */
210:            public void fatal(Object message, Throwable t);
211:
212:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.