Example #1
0
 /**
  * <i>This method is called by the Portico infrastructure during setup.</i>
  *
  * <p>Called right after the connection has been instantiated. Let's the connection peform setup.
  * If there is a configuration problem a {@link JConfigurationException} will be thrown.
  *
  * @param lrc The LRC that this connection is servicing
  * @param properties Additional configuration properties provided by the container
  */
 public void configure(LRC lrc, Map<String, Object> properties) throws JConfigurationException {
   this.lrc = lrc;
   this.logger = Logger.getLogger("portico.lrc.jgroups");
   // set the appropriate level for the jgroups logger, by default we will turn it off
   String jglevel = System.getProperty(Configuration.PROP_JGROUPS_LOGLEVEL, "OFF");
   Log4jConfigurator.setLevel(jglevel, "org.jgroups");
 }
Example #2
0
  public static void testStarting(String className, String methodName) {
    // don't set things up unless per-test log files are enabled
    if (FILE_LOG_LEVEL.equals("${test.fileLogLevel}") || FILE_LOG_LEVEL.equals("no")) return;

    String testSuite = System.getProperty("test.suite", "unknownSuite");
    String filename = "logs/" + testSuite + "/" + className + "/" + methodName + ".log";
    Log4jConfigurator.redirectFileOutput(filename, false);
  }