Skip to content

Commit

Permalink
fix: create logs directory if it is not existing
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulrhmanGoni committed Jan 19, 2025
1 parent ea1a56c commit 9e39f4b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/services/logger/logger_service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { mkdirSync } from "node:fs";
import { appendFile } from "node:fs/promises";
import type { LogDetails } from "../../types/logging";

try {
mkdirSync("logs")
} catch {
//
}

export default async function logger_service(log: LogDetails) {
const timestamp = new Date().toISOString();
if (
Expand Down

0 comments on commit 9e39f4b

Please sign in to comment.