log file path
parent
4a4b472a1b
commit
ae9fef39a3
|
@ -4455,14 +4455,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.RemoteClientLogger = void 0;
|
exports.RemoteClientLogger = void 0;
|
||||||
const node_path_1 = __importDefault(__nccwpck_require__(49411));
|
const node_path_1 = __importDefault(__nccwpck_require__(49411));
|
||||||
|
const cloud_runner_folders_1 = __nccwpck_require__(77795);
|
||||||
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(42864));
|
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(42864));
|
||||||
const node_fs_1 = __importDefault(__nccwpck_require__(87561));
|
const node_fs_1 = __importDefault(__nccwpck_require__(87561));
|
||||||
|
const cloud_runner_system_1 = __nccwpck_require__(4197);
|
||||||
class RemoteClientLogger {
|
class RemoteClientLogger {
|
||||||
static get LogFilePath() {
|
static get LogFilePath() {
|
||||||
return node_path_1.default.join(`/home`, `job-log.txt`);
|
return node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute, `job-log.txt`);
|
||||||
}
|
}
|
||||||
static log(message) {
|
static log(message) {
|
||||||
const finalMessage = `[Client] ${message}`;
|
const finalMessage = `[Client] ${message}`;
|
||||||
|
if (!node_fs_1.default.existsSync(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)) {
|
||||||
|
cloud_runner_system_1.CloudRunnerSystem.Run(`chmod -R a+rX /data/*`);
|
||||||
|
node_fs_1.default.mkdirSync(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute);
|
||||||
|
}
|
||||||
if (!node_fs_1.default.existsSync(this.LogFilePath)) {
|
if (!node_fs_1.default.existsSync(this.LogFilePath)) {
|
||||||
node_fs_1.default.writeFileSync(this.LogFilePath, ``);
|
node_fs_1.default.writeFileSync(this.LogFilePath, ``);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,14 +1,20 @@
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
|
import { CloudRunnerFolders } from '../options/cloud-runner-folders';
|
||||||
import CloudRunnerLogger from '../services/core/cloud-runner-logger';
|
import CloudRunnerLogger from '../services/core/cloud-runner-logger';
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
|
import { CloudRunnerSystem } from '../services/core/cloud-runner-system';
|
||||||
|
|
||||||
export class RemoteClientLogger {
|
export class RemoteClientLogger {
|
||||||
private static get LogFilePath() {
|
private static get LogFilePath() {
|
||||||
return path.join(`/home`, `job-log.txt`);
|
return path.join(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute, `job-log.txt`);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static log(message: string) {
|
public static log(message: string) {
|
||||||
const finalMessage = `[Client] ${message}`;
|
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)) {
|
if (!fs.existsSync(this.LogFilePath)) {
|
||||||
fs.writeFileSync(this.LogFilePath, ``);
|
fs.writeFileSync(this.LogFilePath, ``);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue