newStaffLDB-API #48

Merged
fred.boniface merged 85 commits from newStaffLDB-API into main 2023-10-03 21:35:03 +01:00
Showing only changes of commit f7c20b3d99 - Show all commits

View File

@ -3,12 +3,19 @@ import pino from "pino";
const runtime = process.env.NODE_ENV
let level: string
if (runtime === "production") {
level = "warning"
level = "info"
} else {
level = "debug"
}
console.log(`Runtime mode: ${runtime || "dev"}, Log Level: ${level}`)
export const logger = pino({
name: 'owlboard',
level: level,
formatters: {
level: (label) => {
return { level: label.toUpperCase()}
}
},
timestamp: pino.stdTimeFunctions.isoTime,
});