Skip to content

Commit

Permalink
refactor: change log archive location
Browse files Browse the repository at this point in the history
  • Loading branch information
a20688392 committed Apr 16, 2023
1 parent 874d07c commit 42d0040
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/filters/all-exception.filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class AllExceptionsFilter implements ExceptionFilter {
};

private writeErrorLogToFile = (errorLog: string): void => {
fs.appendFile("error.log", errorLog, "utf8", err => {
fs.appendFile("./log/error.log", errorLog, "utf8", err => {
if (err) throw err;
});
};
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async function bootstrap() {
await app.listen(3000);
}

const logStream = fs.createWriteStream("api.log", {
const logStream = fs.createWriteStream("./log/access.log", {
flags: "a", // append
});

Expand Down

0 comments on commit 42d0040

Please sign in to comment.