Skip to content

Commit

Permalink
Fix overwriting log
Browse files Browse the repository at this point in the history
  • Loading branch information
ggodlewski committed Sep 24, 2023
1 parent b5ba689 commit 460c9e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/logger/JobLogFile.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Transport, {TransportStreamOptions} from 'winston-transport';
import path from 'path';
import fs, {ReadStream} from 'fs';
import {StreamOptions} from 'stream';
import os from 'os';
import {JobLogFileProcessor} from './JobLogFileProcessor';
import {StreamOptions} from 'stream';


interface JobLogStreamOptions extends TransportStreamOptions {
Expand All @@ -25,7 +25,8 @@ function isValidDirName(dirname) {
return !/["<>|\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(dirname);
}

const loggerDefaults = {
const loggerDefaults: { file_options: any, eol: string } = {
file_options: { flags: 'a' },
eol: os.EOL,
};

Expand Down

0 comments on commit 460c9e7

Please sign in to comment.