MCPcopy
hub / github.com/fastify/fastify / validateLogLevelOption

Function validateLogLevelOption

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

Source from the content-addressed store, hash-verified

641}
642
643function validateLogLevelOption (logLevel, method, path, logger) {
644 if (logLevel == null || logLevel === '') return
645 if (logger?.levels?.values == null) return
646
647 if (typeof logLevel !== 'string' || logger.levels.values[logLevel] === undefined) {
648 throw new FST_ERR_ROUTE_LOG_LEVEL_INVALID(method, path, logLevel)
649 }
650}
651
652function runPreParsing (err, request, reply) {
653 if (reply.sent === true) return

Callers 1

addNewRouteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected