Exemplo n.º 1
0
  protected void replaceLoggers(LocalizedStringList properties) {
    StringBuilder sp = new StringBuilder();

    @SuppressWarnings("rawtypes")
    Enumeration appenders = Logger.getRootLogger().getAllAppenders();

    for (int i = 1; appenders.hasMoreElements(); i++) {
      Object o = appenders.nextElement();
      if (i > 1) {
        sp.append("\n");
      }
      sp.append(String.format("#%d\n%s", i, ToStringBuilder.reflectionToString(o)));
    }

    properties.replace("t{logger.appenders}", sp.toString());
  }
Exemplo n.º 2
0
 protected void replaceTweial(LocalizedStringList properties) {
   DatabaseDirectory db = databaseDirectoryMgr.get();
   {
     properties.replace("t{tweial.title}", version.getImplementationTitle());
     properties.replace("t{tweial.vender}", version.getImplementationVendor());
     properties.replace("t{tweial.version}", version.getImplementationVersion());
     properties.replace("t{tweial.properties}", propertiesFile.getAbsolutePath());
     properties.replace("t{tweial.directory}", applicationDirectory.getAbsolutePath());
     properties.replace("t{tweial.database}", db == null ? "<missing>" : db.getAbsolutePath());
   }
 }
Exemplo n.º 3
0
 public void view() {
   log.info("view()");
   log.info(applicationProperties.toString());
   console.p(applicationProperties);
   console.p(welcome);
 }
Exemplo n.º 4
0
 protected void replaceJava(LocalizedStringList properties) {
   properties.replace("t{java.home}", System.getProperty("java.home"));
   properties.replace("t{java.vendor}", System.getProperty("java.vendor"));
   properties.replace("t{java.version}", System.getProperty("java.version"));
 }
Exemplo n.º 5
0
 protected void replaceUser(LocalizedStringList properties) {
   properties.replace("t{user.name}", System.getProperty("user.name"));
   properties.replace("t{user.home}", System.getProperty("user.home"));
   properties.replace("t{user.directory}", System.getProperty("user.dir"));
 }