import pino from "pino";

const runtime = process.env.NODE_ENV
let level: string
  if (runtime === "production") {
    level = "info"
  } else {
    level = "debug"
  }

  export const logger = pino({
    level: level,
    formatters: {
      level: (label) => {
        return { level: label.toUpperCase()}
      }
    },
    timestamp: pino.stdTimeFunctions.isoTime,
  });
