Log Level

noun

say it: “LAWG LEV-ul” /lɔɡ ˈlɛvəl/

A label on each log message saying how serious it is, used to choose which messages get written.

What is a log level?

A log level says how serious a log line is, such as debug, info, warn or error. A logger set to one level writes lines at that level and above and skips the rest, so the live server can stay quiet while your laptop shows everything.

const logger = pino({ level: "warn" });
logger.info("menu loaded");     // skipped
logger.error("payment failed"); // written

In a sentence

  • “In production the log level is info, so debug lines aren't written.”
  • “Set the log level to debug while hunting a bug, then put it back.”

Level: Apprentice · More Software Development terms at this level

Updated