Content deleted Content added
Shevonsilva (talk | contribs) No edit summary |
m →Example: "Nonexistant" -> "Nonexistent", "non-existent" -> "nonexistent" |
||
(24 intermediate revisions by 20 users not shown) | |||
Line 1:
{{Short description|Logging model and program}}
{{Infobox software
| name
| logo =
| screenshot =
| caption =
| developer
| released
| latest release version = 1.
| latest release date
| latest preview version =
| latest preview date =
| operating system
| repo = {{URL|https://github.com/apache/commons-logging}}
| programming language
| genre
| license
| website
}}
'''Apache Commons Logging''' (previously known as '''Jakarta Commons Logging'''
== JCL log level ==▼
The following table defines the log levels and messages in JCL, in decreasing order of severity. The left column lists the log level designation in Jand the right column provides a brief description of each log level.▼
▲The following table defines the log levels and messages in
{| class="wikitable"
Line 42 ⟶ 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
== Configuration ==
Two basic abstractions, Log and LogFactory, are used in
== Example ==
Sample code may look like as follows:
<
package com.cascadetg.ch09;
Line 58 ⟶ 63:
{
// Note that you pass in an instance of this class to the
// log generator.
// generated by this class.
private static Log log = LogFactory.getLog(LogGenerator.class);
Line 95 ⟶ 100:
} catch (Exception e)
{
log.fatal(e.getMessage(), e);
}
Line 114 ⟶ 119:
try
{
Class.forName("com.cascadetg.
} catch (Exception e)
{
log.warn("Can't find a
}
System.out.println();
Line 152 ⟶ 157:
System.out.println();
System.out.println("Log test complete.");
}
}
</
== See also ==
{{Portal|
*[[log4j]]
*
== References ==
{{Reflist}}
==External links==▼
* {{Official website|http://commons.apache.org/proper/commons-logging/}} ▼
▲== External links ==
[[Category:Apache Software Foundation]]▼
{{Apache Software Foundation}}
▲[[Category:Apache Software Foundation|Commons Logging]]
[[Category:Free software programmed in Java (programming language)]]
[[Category:Log file formats]]
[[Category:Software using the Apache license]]
[[Category:Apache Commons|Logging]]
|