Skip to content

Adding an option to surpress or modify the non-existent root directory warning #524

Open
@xen143

Description

@xen143

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

Hey, would it be possible to surpress or modify (preferably) the warning that gets logged, when one of the root directories from the config does not exist, such as:

"root" path "..." must exist

I want to set my own message when this occurs. Would it make sense? If so, I can create a PR for this feature.

Motivation

No response

Example

I am imagining something in the lines of:

fastify.register(fastifyStatic, {
  root: './static',
  getPathNotFoundWarning: (path) => `"root" path "${path}" must exist`,
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions