MCPcopy Create free account
hub / github.com/fastify/fastify / validateLogLevelOption

Function validateLogLevelOption

lib/route.js:635–642  ·  view source on GitHub ↗
(logLevel, method, path, logger)

Source from the content-addressed store, hash-verified

633}
634
635function validateLogLevelOption (logLevel, method, path, logger) {
636 if (logLevel == null || logLevel === '') return
637 if (logger?.levels?.values == null) return
638
639 if (typeof logLevel !== 'string' || logger.levels.values[logLevel] === undefined) {
640 throw new FST_ERR_ROUTE_LOG_LEVEL_INVALID(method, path, logLevel)
641 }
642}
643
644function runPreParsing (err, request, reply) {
645 if (reply.sent === true) return

Callers 1

addNewRouteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected