Source Code Cross Referenced for Log.java in  » Library » apache-common-Logging » org » apache » commons » 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 » Library » apache common Logging » org.apache.commons.logging 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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