Skip to content

Commit

Permalink
fix: typo causing compile error
Browse files Browse the repository at this point in the history
fix: mkdir for log if not exists by setting opt
  • Loading branch information
williams-jack committed Aug 5, 2024
1 parent 71ee996 commit d910249
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
7 changes: 5 additions & 2 deletions orchestrator/packages/common/src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import pino, { destination } from "pino";
import pino from "pino";
import { getConfig } from "./config";
import path from "path";

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',
Expand Down

0 comments on commit d910249

Please sign in to comment.