JmeSystem: print build info on initialization

This commit is contained in:
shadowislord 2015-02-09 21:07:59 -05:00
parent eda5e983da
commit 253c3ac80d
3 changed files with 11 additions and 2 deletions

View File

@ -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

View File

@ -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);

View File

@ -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