KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > util > logging > TestConfig


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10 package org.mmbase.util.logging;
11
12 import org.mmbase.util.ResourceLoader;
13
14 /**
15  * Class TestConfig
16  *
17  * @javadoc
18  */

19
20 public class TestConfig {
21     public static void main(String JavaDoc[] args) {
22         String JavaDoc configuration = args[0];
23         String JavaDoc category = args[1];
24         Logging.configure(ResourceLoader.getConfigurationRoot(), configuration);
25         Logger log = Logging.getLoggerInstance(category);
26
27         log.trace("a trace message");
28         log.debug("a debug message");
29         log.info("an info message");
30         log.service("a service message");
31         log.warn("a warn message");
32         log.error("an error message");
33
34         Logging.shutdown();
35
36     }
37 }
38
Popular Tags