mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
log file path
This commit is contained in:
parent
4a4b472a1b
commit
ae9fef39a3
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
@ -1,14 +1,20 @@
|
||||
import path from 'node:path';
|
||||
import { CloudRunnerFolders } from '../options/cloud-runner-folders';
|
||||
import CloudRunnerLogger from '../services/core/cloud-runner-logger';
|
||||
import fs from 'node:fs';
|
||||
import { CloudRunnerSystem } from '../services/core/cloud-runner-system';
|
||||
|
||||
export class RemoteClientLogger {
|
||||
private static get LogFilePath() {
|
||||
return path.join(`/home`, `job-log.txt`);
|
||||
return path.join(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute, `job-log.txt`);
|
||||
}
|
||||
|
||||
public static log(message: string) {
|
||||
const finalMessage = `[Client] ${message}`;
|
||||
if (!fs.existsSync(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)) {
|
||||
CloudRunnerSystem.Run(`chmod -R a+rX /data/*`);
|
||||
fs.mkdirSync(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute);
|
||||
}
|
||||
if (!fs.existsSync(this.LogFilePath)) {
|
||||
fs.writeFileSync(this.LogFilePath, ``);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user