{"id":22374849,"url":"https://github.com/qubitproducts/express-driftwood","last_synced_at":"2025-03-26T17:33:16.623Z","repository":{"id":66964751,"uuid":"72659076","full_name":"QubitProducts/express-driftwood","owner":"QubitProducts","description":"Express middleware for logging with driftwood","archived":false,"fork":false,"pushed_at":"2019-10-23T12:44:11.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T18:18:11.779Z","etag":null,"topics":["ceh","implement"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QubitProducts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-02T16:26:13.000Z","updated_at":"2023-06-02T12:06:41.000Z","dependencies_parsed_at":"2023-03-01T16:15:43.118Z","dependency_job_id":null,"html_url":"https://github.com/QubitProducts/express-driftwood","commit_stats":{"total_commits":14,"total_committers":5,"mean_commits":2.8,"dds":0.3571428571428571,"last_synced_commit":"68b66bf734b164414cee5d45281967deeff8ce9a"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QubitProducts%2Fexpress-driftwood","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QubitProducts%2Fexpress-driftwood/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QubitProducts%2Fexpress-driftwood/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QubitProducts%2Fexpress-driftwood/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QubitProducts","download_url":"https://codeload.github.com/QubitProducts/express-driftwood/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245702372,"owners_count":20658602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ceh","implement"],"created_at":"2024-12-04T21:18:43.984Z","updated_at":"2025-03-26T17:33:16.588Z","avatar_url":"https://github.com/QubitProducts.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# express-driftwood\n\nA tiny piece of express middleware for logging requests using [QubitProducts/driftwood](https://github.com/QubitProducts/driftwood).\n\n\n### Installation\n\n```\nnpm i driftwood express-driftwood\n```\n\n\n### Usage\n\nJust call `express-driftwood` with an instance of driftwood and mount it in your express app before everything else:\n\n```js\nconst createLogger = require('driftwood')\nconst expressLogger = require('./index')\nconst express = require('express')\n\ncreateLogger.enable({ '*': 'trace' })\n\nconst log = createLogger('my-app')\nconst app = express()\n\napp.use(expressLogger(log))\napp.get('/', (req, res) =\u003e res.send('Wooo!'))\napp.get('/400', (req, res) =\u003e res.status(400).send('You dun goofed'))\napp.get('/500', (req, res) =\u003e res.status(500).send('We dun goofed'))\n\napp.listen(1119, () =\u003e {\n  log.info('my-app started!')\n})\n```\n\n![](http://i.imgur.com/nDfx9eX.png)\n\n\n### Options\n\nOptions can be passed as a second argument.\n\n\n### options.ignore\n\nA string, regex, function or array of the former, to match URLs that you don't want to log:\n\n```js\n{\n  ignore: ['/status', /^\\/status/, (url) =\u003e url.indexOf('/status') \u003e -1]\n}\n```\n\n### options.rewrite\n\nA function that rewrites urls, e.g. to remove sensitive data:\n\n```js\n{\n  rewrite: (url) =\u003e url.replace('secret', '*****')\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqubitproducts%2Fexpress-driftwood","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqubitproducts%2Fexpress-driftwood","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqubitproducts%2Fexpress-driftwood/lists"}