The version of Apache log4j used by SoundHelix.

[[ 🗃 ^aEp6o apache-log4j ]] :: [📥 Inbox] [📤 Outbox] [🐤 Followers] [🤝 Collaborators] [🛠 Commits]

Clone

HTTPS: git clone https://vervis.peers.community/repos/aEp6o

SSH: git clone USERNAME@vervis.peers.community:aEp6o

Branches

Tags

v_1_1 :: src / java / org / apache / log4j / test /

ShippedCodeFlagTest.java


package org.apache.log4j.test;

import org.apache.log4j.Category;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.SimpleLayout;
import org.apache.log4j.ConsoleAppender;
	
public class ShippedCodeFlagTest {

  static Category CAT=Category.getInstance(ShippedCodeFlagTest.class.getName());

  public static void main( String[] argv) {

    String type = null;
    if(argv.length == 1) 
      type = argv[0];
    else 
      Usage("Wrong number of arguments.");
     
    if(type.equals("basic")) {
       System.out.println("System property \""+
			  BasicConfigurator.DISABLE_OVERRIDE_KEY +
			  "\" is set to ["+
		  System.getProperty(BasicConfigurator.DISABLE_OVERRIDE_KEY)
			  +"].");
    
       BasicConfigurator.configure(new ConsoleAppender(new SimpleLayout(),
						 ConsoleAppender.SYSTEM_OUT));
     
    }
    else { 
      PropertyConfigurator.configure(type);
    }
    Category.getDefaultHierarchy().disableInfo();       
    CAT.debug("Hello world");
  }

  static
  void Usage(String msg) {
    System.err.println(msg);
    System.err.println( "Usage: java org.apache.log4j.test.ShippedCodeFlagTest " +
			"basic|configFile");
    System.exit(1);
  }

}

[See repo JSON]