JmeSystem: print build info on initialization

experimental
shadowislord 10 years ago
parent eda5e983da
commit 253c3ac80d
  1. 2
      jme3-android/src/main/java/com/jme3/system/android/JmeAndroidSystem.java
  2. 9
      jme3-core/src/main/java/com/jme3/system/JmeSystemDelegate.java
  3. 2
      jme3-desktop/src/main/java/com/jme3/system/JmeDesktopSystem.java

@ -145,7 +145,7 @@ public class JmeAndroidSystem extends JmeSystemDelegate {
return;
}
initialized = true;
logger.log(Level.INFO, "Running on {0}", getFullName());
logger.log(Level.INFO, getBuildInfo());
}
@Override

@ -172,6 +172,15 @@ public abstract class JmeSystemDelegate {
}
}
public String getBuildInfo() {
StringBuilder sb = new StringBuilder();
sb.append("Running on ").append(getFullName()).append("\n");
sb.append(" * Branch: ").append(JmeVersion.BRANCH_NAME).append("\n");
sb.append(" * Git Hash: ").append(JmeVersion.GIT_SHORT_HASH).append("\n");
sb.append(" * Build Date: ").append(JmeVersion.BUILD_DATE);
return sb.toString();
}
public abstract JmeContext newContext(AppSettings settings, JmeContext.Type contextType);
public abstract AudioRenderer newAudioRenderer(AppSettings settings);

@ -369,7 +369,7 @@ public class JmeDesktopSystem extends JmeSystemDelegate {
} catch (SecurityException ex) {
logger.log(Level.SEVERE, "Security error in creating log file", ex);
}
logger.log(Level.INFO, "Running on {0}", getFullName());
logger.log(Level.INFO, getBuildInfo());
}
@Override

Loading…
Cancel
Save