log file path
parent
1a5b953c86
commit
4a4b472a1b
|
@ -4455,18 +4455,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.RemoteClientLogger = void 0;
|
||||
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 node_fs_1 = __importDefault(__nccwpck_require__(87561));
|
||||
class RemoteClientLogger {
|
||||
static get LogFilePath() {
|
||||
return node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute, `job-log.txt`);
|
||||
return node_path_1.default.join(`/home`, `job-log.txt`);
|
||||
}
|
||||
static log(message) {
|
||||
const finalMessage = `[Client] ${message}`;
|
||||
if (!node_fs_1.default.existsSync(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)) {
|
||||
node_fs_1.default.mkdirSync(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute);
|
||||
}
|
||||
if (!node_fs_1.default.existsSync(this.LogFilePath)) {
|
||||
node_fs_1.default.writeFileSync(this.LogFilePath, ``);
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,18 +1,14 @@
|
|||
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';
|
||||
|
||||
export class RemoteClientLogger {
|
||||
private static get LogFilePath() {
|
||||
return path.join(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute, `job-log.txt`);
|
||||
return path.join(`/home`, `job-log.txt`);
|
||||
}
|
||||
|
||||
public static log(message: string) {
|
||||
const finalMessage = `[Client] ${message}`;
|
||||
if (!fs.existsSync(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)) {
|
||||
fs.mkdirSync(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute);
|
||||
}
|
||||
if (!fs.existsSync(this.LogFilePath)) {
|
||||
fs.writeFileSync(this.LogFilePath, ``);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue