Skip to content

Errors and warning are written to console #185

@laino

Description

@laino

node-static is spamming console.error with useless stack traces when receiving "invalid" range headers and the like. It would be nice if those warning could at least be intercepted, so they can be funneled through custom logging and the like.

Maybe an "error" event, where if there are no even listeners registered the error gets printed to the console?

Currently I get a few of these every second, which makes my log files.... very unreadable:

Request contains invalid range header:  [ '13620', '13620' ]
Error: Range request present but invalid, might serve whole file instead
    at Server.respondNoGzip (/var/volafile/app/node_modules/node-static/lib/node-static.js:300:23)
    at /var/volafile/app/node_modules/node-static/lib/node-static.js:224:18
    at FSReqWrap.oncomplete (fs.js:111:15)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions