From d9102491c1851e8ba976862e8db6e542bdaa874a Mon Sep 17 00:00:00 2001 From: williams-jack Date: Mon, 5 Aug 2024 00:35:28 -0400 Subject: [PATCH] fix: typo causing compile error fix: mkdir for log if not exists by setting opt --- .../api/src/controllers/grading-queue-controller.ts | 1 - orchestrator/packages/common/src/logger.ts | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/orchestrator/packages/api/src/controllers/grading-queue-controller.ts b/orchestrator/packages/api/src/controllers/grading-queue-controller.ts index c66328bd..3287a9e2 100644 --- a/orchestrator/packages/api/src/controllers/grading-queue-controller.ts +++ b/orchestrator/packages/api/src/controllers/grading-queue-controller.ts @@ -23,7 +23,6 @@ import { getJobStatus } from "@codegrade-orca/db"; import { describeReleaseTiming, reservationWaitingOnRelease } from "../utils/helpers"; -import url export const getGradingJobs = async (req: Request, res: Response) => { if ( diff --git a/orchestrator/packages/common/src/logger.ts b/orchestrator/packages/common/src/logger.ts index 17a57d6b..1983a216 100644 --- a/orchestrator/packages/common/src/logger.ts +++ b/orchestrator/packages/common/src/logger.ts @@ -1,4 +1,4 @@ -import pino, { destination } from "pino"; +import pino from "pino"; import { getConfig } from "./config"; import path from "path"; @@ -6,7 +6,10 @@ const transport = pino.transport({ targets: [ { target: 'pino/file', - options: { destination: path.join(__dirname, '../../../', 'logs', `${getConfig().environment}.log`) } + options: { + destination: path.join(__dirname, '../../../', 'logs', `${getConfig().environment}.log`), + mkdir: true + } }, { target: 'pino/file',