Content deleted Content added
m Fix link to Java portal (via WP:JWB) |
No edit summary |
||
Line 7:
| released =
| latest release version = 1.2
| latest release date = {{release date|
| latest preview version =
| latest preview date =
Line 17:
}}
'''Apache Commons Logging''' (previously known as '''Jakarta Commons Logging'''
==
The following table defines the log levels and messages in
{| class="wikitable"
Line 46:
|}<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 ==
Two basic abstractions, Log and LogFactory, are used in
== Example ==
Sample code may look like as follows:
<source lang="Java">
Line 98:
} catch (Exception e)
{
log.fatal(e.getMessage(), e);
}
Line 119:
Class.forName("com.cascadetg.NonexistantClass");
} catch (Exception e)
{
log.warn("Can't find a non-existent class!");
}
System.out.println();
Line 155:
System.out.println();
System.out.println("Log test complete.");
}
}
</source><ref name=":ajc_120"/>
== See also ==
{{Portal|Java (programming language)|Free software}}
*[[log4j]]
Line 166 ⟶ 165:
*{{GitHub|https://github.com/apache/commons-logging/commits?author=costinm}}
== References ==
{{Reflist}}
== External links ==
*{{Official website|https://commons.apache.org/proper/commons-logging/}}
|