Introduce config log at the start of a session for debugging purposes

This commit is contained in:
DaCool
2022-09-10 10:10:57 +00:00
committed by harlekin
parent 55a81985f4
commit 8fd40abf09
2 changed files with 38 additions and 2 deletions

View File

@@ -60,6 +60,7 @@ import com.sheepit.client.exception.FermeExceptionSessionDisabled;
import com.sheepit.client.exception.FermeExceptionSessionDisabledDenoisingNotSupported; import com.sheepit.client.exception.FermeExceptionSessionDisabledDenoisingNotSupported;
import com.sheepit.client.exception.FermeServerDown; import com.sheepit.client.exception.FermeServerDown;
import com.sheepit.client.hardware.cpu.CPU; import com.sheepit.client.hardware.cpu.CPU;
import com.sheepit.client.hardware.hwid.HWIdentifier;
import com.sheepit.client.os.OS; import com.sheepit.client.os.OS;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@@ -165,6 +166,13 @@ import okhttp3.HttpUrl;
}, this.configuration.getShutdownTime()); }, this.configuration.getShutdownTime());
} }
//send "error" log containing config
step = log.newCheckPoint();
this.log.info("HWID: " + new HWIdentifier(log).getHardwareHash());
this.log.info("OS: " + OS.getOS().getVersion() + " " + System.getProperty("os.arch"));
this.log.info(configuration.toString());
sendError(step, null, Type.OK);
// Check integrity of all files in the working directories // Check integrity of all files in the working directories
this.configuration.cleanWorkingDirectory(); this.configuration.cleanWorkingDirectory();

View File

@@ -115,7 +115,35 @@ import lombok.Data;
} }
public String toString() { public String toString() {
return String.format("Configuration (workingDirectory '%s')", this.workingDirectory.getAbsolutePath()); String c = " CFG: ", n ="\n";
return
c + "configFilePath: " + configFilePath + n +
c + "workingDirectory: " + workingDirectory + n +
c + "sharedDownloadsDirectory: " + sharedDownloadsDirectory + n +
c + "storageDirectory: " + storageDirectory + n +
c + "userHasSpecifiedACacheDir: " + userHasSpecifiedACacheDir + n +
c + "static_exeDirName: " + static_exeDirName + n +
c + "login: " + login + n +
c + "proxy: " + proxy + n +
c + "maxUploadingJob: " + maxUploadingJob + n +
c + "nbCores: " + nbCores + n +
c + "maxAllowedMemory: " + maxAllowedMemory + n +
c + "maxRenderTime: " + maxRenderTime + n +
c + "priority: " + priority + n +
c + "computeMethod: " + computeMethod + n +
c + "GPUDevice: " + GPUDevice + n +
c + "detectGPUs: " + detectGPUs + n +
c + "printLog: " + printLog + n +
c + "requestTime: " + requestTime + n +
c + "shutdownTime: " + shutdownTime + n +
c + "shutdownMode: " + shutdownMode + n +
c + "extras: " + extras + n +
c + "autoSignIn: " + autoSignIn + n +
c + "useSysTray: " + useSysTray + n +
c + "headless: " + headless + n +
c + "UIType: " + UIType + n +
c + "hostname: " + hostname + n +
c + "theme: " + theme;
} }
public void setUsePriority(int priority) { public void setUsePriority(int priority) {