Apache Commons Logging: Difference between revisions

Content deleted Content added
No edit summary
m Example: "Nonexistant" -> "Nonexistent", "non-existent" -> "nonexistent"
 
(12 intermediate revisions by 11 users not shown)
Line 1:
{{Short description|Logging model and program}}
{{Infobox software
| name = Apache Commons Logging
| logo =
| screenshot =
| caption =
| developer = [[Apache Software Foundation]]
| caption =
| released =
| developer = [[Apache Software Foundation]]
| latest release version = 1.3.4
| released =
| latest release versiondate = 1.2{{Start date and age|2024|08|16}}
| latest release date = {{release date|2014|07}}
| latest preview version =
| latest preview date =
| operating system = [[Cross-platform]]
| website repo = {{URL|https://commonsgithub.com/apache.org/proper/commons-logging/}}
| programming language = [[Java (programming language)|Java]]
| genre = [[Logging Tool]]
| license = [[Apache License 2.0]]
| website = {{URL|https://commons.apache.org/proper/commons-logging/}}
| website = {{URL|https://commons.apache.org/proper/commons-logging/}}
}}
 
'''Apache Commons Logging''' (previously known as '''Jakarta Commons Logging''' or '''JCL''') is a [[Java platform|Java]]-based [[data logging|logging]] utility and a programming model for logging and for other toolkits. It provides [[Application programming interface|API]]s, log implementations, and [[Adapter pattern|wrapper]] implementations over some other tools.<ref name=":ac">{{Cite web|url = http://commons.apache.org/proper/commons-logging/|title = commons logging|access-date = |accessdate = 12 February 2016|website = Apache.org|publisher = Apache|last = |first = }}</ref><ref name=":ijcliwas_2">{{Cite book|title = Integrating Jakarta Commons Logging with IBM WebSphere Application Server V5|url=http://www-01.ibm.com/support/docview.wss?uid=swg27004610&aid=1|last = Zavala|first = D.A.|last2 = Lau| first2 = Y.C.| publisher = IBM corporation|year = 2004|___location = |volume = |pages = 2}}</ref><ref name=":ac_c">{{Cite web|url = http://commons.apache.org/proper/commons-logging/guide.html|title = contents|access-date = |accessdate = 12 February 2016|website = Apache.org|publisher = Apache|last = |first = }}</ref>
 
== Log level ==
Line 44 ⟶ 46:
| '''trace'''
| Most detailed information. Expect these to be written to logs only.
|}<ref name=":ac_c"/><ref name=":ajc_120">{{Cite book|title = Apache Jakarta Commons - Reusable Java Components|last = Iverson|first = W.|publisher = Pearson Education, Inc.|year = 2005|___location = Crawfordsville, Indiana, USA|volume = |pages = 120–122}}</ref>
 
== Configuration ==
Line 51 ⟶ 53:
== Example ==
Sample code may look like as follows:
<sourcesyntaxhighlight lang="Java">
package com.cascadetg.ch09;
 
Line 117 ⟶ 119:
try
{
Class.forName("com.cascadetg.NonexistantClassNonexistentClass");
} catch (Exception e)
{
log.warn("Can't find a non-existentnonexistent class!");
}
 
Line 157 ⟶ 159:
}
}
</sourcesyntaxhighlight><ref name=":ajc_120"/>
 
== See also ==
{{Portal|JavaComputer (programming language)|Free and open-source software}}
*[[log4j]]
*[[Chainsaw (log file viewer)]]
*{{GitHub|https://github.com/apache/commons-logging}}
 
Line 177 ⟶ 179:
[[Category:Log file formats]]
[[Category:Software using the Apache license]]
[[Category:Apache Commons|Logging]]