Example #1
0
 private static void staticInit()
 {
   logSources = new Vector();
   String str = DebugUtil.getAntProperty("${LOG_SOURCE_LEVELS}", "");
   logSourceLevels = parseLogSourceLevelsConfig(str);
   if (!RuntimeVarz.getInstance().isRegistered("/logs/level"))
     RuntimeVarz.getInstance().register("/logs/level", new String[] { str, "*=FINE", "*=INFO", "*=SEVERE" });
   logSourceObserver = new LogSourceObserver();
   RuntimeVarz.getInstance().addObserver(logSourceObserver);
   defaultLogSource = new LogSource(LogSource.class, null);
 }
Example #2
0
  private static class LogSourceObserver
    implements Observer
  {
    private String logLevelSources = RuntimeVarz.getInstance().getValue("/logs/level");

    public void update(Observable paramObservable, Object paramObject)
    {
      if ("/logs/level".equals(paramObject))
        try
        {
          String str = RuntimeVarz.getInstance().getValue("/logs/level");
          if (!str.equals(this.logLevelSources))
          {
            System.out.println("New log source level:" + str);
            this.logLevelSources = str;
            LogSource.access$002(LogSource.parseLogSourceLevelsConfig(str));
            LogSource.access$200();
          }
          return;
        }
        finally
        {
        }
    }
  }