{"id":15756174,"url":"https://github.com/simenandre/fastify-frontend-logger","last_synced_at":"2025-04-30T18:29:30.844Z","repository":{"id":45374319,"uuid":"513534357","full_name":"simenandre/fastify-frontend-logger","owner":"simenandre","description":"A Fastify plugin for receiving browser logs to a server","archived":false,"fork":false,"pushed_at":"2025-04-08T10:02:37.000Z","size":318,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T23:47:04.725Z","etag":null,"topics":["fastify","fastify-plugin","logger","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simenandre.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2022-07-13T13:34:27.000Z","updated_at":"2023-04-21T20:45:38.000Z","dependencies_parsed_at":"2023-02-08T08:15:37.615Z","dependency_job_id":"6f63912a-41a7-49cd-84d4-6817623773a3","html_url":"https://github.com/simenandre/fastify-frontend-logger","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Ffastify-frontend-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Ffastify-frontend-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Ffastify-frontend-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Ffastify-frontend-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simenandre","download_url":"https://codeload.github.com/simenandre/fastify-frontend-logger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251760275,"owners_count":21639374,"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":["fastify","fastify-plugin","logger","typescript"],"created_at":"2024-10-04T08:42:04.390Z","updated_at":"2025-04-30T18:29:30.801Z","avatar_url":"https://github.com/simenandre.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastify-frontend-logger\n\nA Fastify plugin for receiving browser logs to a server\n\n## Features\n\n- Very customizable\n- Logger objects like `pino`\n- Appends `\"type\": \"frontend-logger\"` to every log.\n\n## Quickstart\n\n```bash\nyarn add fastify-frontend-logger\n```\n\n```typescript\nimport fastify from 'fastify';\nimport { frontendLoggerPlugin } from 'fastify-frontend-logger';\n\nconst server = fastify();\nserver.register(frontendLoggerPlugin);\n```\n\nThe frontend logger adds a method to your server at `/logger`. This consumes a\ndefault logger object:\n\n```json\n[\n  {\n    \"msg\": \"Hello world\",\n    \"level\": 30,\n    \"time\": 1483531681798,\n    \"ctx\": {\n      \"browser\": \"Firefox\"\n    },\n    \"payload\": {\n      \"users\": [\"cobraz\"]\n    }\n  }\n]\n```\n\n**Note**: You can change how the logger object is by setting `bodySchema` in the\nplugin options.\n\n## Options\n\n- `path` can be used to change where the logger is served (defaults to\n  `/logger`).\n- `bodySchema` can be used to change the validation schema.\n- `preHandler` can be used to run code before passing to logs (e.g.\n  authentication)\n- `loggerOptions` the plugin adds a logger child, with this option you can set\n  your own.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimenandre%2Ffastify-frontend-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimenandre%2Ffastify-frontend-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimenandre%2Ffastify-frontend-logger/lists"}