Skip to content

Commit 314f095

Browse files
committed
Log operating system.
1 parent 84e0099 commit 314f095

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

core/src/main/java/ch/cyberduck/core/preferences/Preferences.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ protected void configureAppenders(final String level) {
433433
withCustomActions(new Action[]{new AbstractAction() {
434434
@Override
435435
public boolean execute() {
436-
log.info("Running version {}", getVersion());
436+
log.info("Running version {} on {}", getVersion(), getSystem());
437437
return true;
438438
}
439439
}, deleteAction}).build())
@@ -566,4 +566,11 @@ public String getVersion() {
566566
this.getProperty("application.revision"),
567567
this.getProperty("application.hash"));
568568
}
569+
570+
public String getSystem() {
571+
return String.format("%s %s (%s)",
572+
this.getProperty("os.name"),
573+
this.getProperty("os.version"),
574+
this.getProperty("os.arch"));
575+
}
569576
}

core/src/main/java/ch/cyberduck/core/preferences/PreferencesFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static synchronized void set(final Preferences p) {
4141
preferences.setDefaults(LocalFactory.get(SupportDirectoryFinderFactory.get().find(), "default.properties"));
4242
preferences.configureLogging(preferences.getProperty("logging"));
4343
final Logger log = LogManager.getLogger(PreferencesFactory.class);
44-
log.info("Running version {}", preferences.getVersion());
44+
log.info("Running version {} on {}", preferences.getVersion(), preferences.getSystem());
4545
}
4646

4747
public static synchronized Preferences get() {

0 commit comments

Comments
 (0)