Skip to content

Commit

Permalink
Removed customLogs
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterbrandsen committed Feb 10, 2024
1 parent 2cbd1b7 commit 42a6075
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ config.json
# Folders
node_modules
dist
logs
customLogs
logs
4 changes: 2 additions & 2 deletions src/exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ export default class Exporter {
}

static getLoggerFile() {
if (fs.existsSync("./customLogs/logListener.log", "utf8")) {
const fileText = fs.readFileSync("./customLogs/logListener.log", "utf8");
if (fs.existsSync("./logs/logListener.log", "utf8")) {
const fileText = fs.readFileSync("./logs/logListener.log", "utf8");
const fileLineCount = fileText.split("\n").length;
return { success: true, text: fileText, lineCount: fileLineCount };
}
Expand Down
2 changes: 1 addition & 1 deletion src/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const logger = winston.createLogger({
defaultMeta: { service: "user-service" },
transports: [
new winston.transports.File({
filename: "customLogs/logListener.log",
filename: "logs/logListener.log",
level: "debug",
}),
],
Expand Down
7 changes: 0 additions & 7 deletions src/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,11 @@ function UpdateConfigJsonFile() {

export function RemoveLogs() {
const logsPath = join(__dirname, "../logs");
const customLogsPath = join(__dirname, "../customLogs");
let logsExist = fs.existsSync(logsPath);
if (logsExist && argv.deleteLogs) {
fs.rmdirSync(logsPath, { recursive: true });
logsExist = false;
}

const logcustomLogsExist = fs.existsSync(customLogsPath);
if (logcustomLogsExist && argv.deleteLogs) {
fs.rmdirSync(customLogsPath, { recursive: true });
logsExist = false;
}
}

export default async function Setup() {
Expand Down

0 comments on commit 42a6075

Please sign in to comment.