*
* @author Sebastien Chassande-Barrioz
*/
public class Additivity {
public static void main(String[] args) {
LoggerFactory lf;
switch(args.length) {
case 0:
//Let monolog find the monolog.properties in the classpath or use
// the default configuration
lf = Monolog.initialize();
break;
case 1:
// A monolog configuration file has been specified, then use it
lf = Monolog.getMonologFactory(args[0]);
break;
default:
System.out.println("Syntax error!\nUsage: java Additivity [<monolog file name>]");
return;
}
Logger l = lf.getLogger("monolog.examples.additivity.foo.bar");
l.log(BasicLevel.DEBUG, "This is an additivity example");
}