{"id":21835749,"url":"https://github.com/vtex/pino-splunk-events","last_synced_at":"2026-02-20T18:31:18.535Z","repository":{"id":40703620,"uuid":"369257570","full_name":"vtex/pino-splunk-events","owner":"vtex","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-19T02:36:12.000Z","size":2758,"stargazers_count":1,"open_issues_count":16,"forks_count":4,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-10-05T22:42:15.120Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vtex.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-05-20T15:37:10.000Z","updated_at":"2022-03-16T13:52:44.000Z","dependencies_parsed_at":"2025-04-15T23:15:25.330Z","dependency_job_id":null,"html_url":"https://github.com/vtex/pino-splunk-events","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/vtex/pino-splunk-events","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Fpino-splunk-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Fpino-splunk-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Fpino-splunk-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Fpino-splunk-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vtex","download_url":"https://codeload.github.com/vtex/pino-splunk-events/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Fpino-splunk-events/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29660020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T16:33:43.953Z","status":"ssl_error","status_checked_at":"2026-02-20T16:33:43.598Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-27T20:24:21.222Z","updated_at":"2026-02-20T18:31:18.513Z","avatar_url":"https://github.com/vtex.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/pino-splunk-events)](https://www.npmjs.com/package/pino-splunk-events)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n![GitHub](https://img.shields.io/github/license/vtex/pino-splunk-events)\n\n---\n\n# pino-splunk-events\n\n### Install\n\n```bash\n$ npm install pino-splunk-events\n```\n\n### Usage\n\n```bash\n$ node app.js | npx pino-splunk-events --endpoint=YOUR_SPLUNK_ENDPOINT --token=YOUR_SPLUNK_TOKEN\n```\n\n#### Node (development mode)\n\n```ts\nimport { PrettyConsole } from 'pino-splunk-events/lib/core/PrettyConsole'\n\nconst logger = pino({\n  prettyPrint: {\n    messageFormat: PrettyConsole.messageFormat,\n  },\n})\n```\n\n#### Browser (production mode)\n\n```ts\nimport { getPinoBrowserWriteLog } from 'pino-splunk-events/lib/browser'\nimport SplunkEvents from 'splunk-events'\nimport pino from 'pino'\n\nconst splunk = new SplunkEvents({\n  endpoint: process.env.SPLUNK_ENDPOINT,\n  token: process.env.SPLUNK_TOKEN,\n\n  // IMPORTANT! You need to set this flag\n  // to permit send nested data to splunk\n  // otherwise it will fails when try to\n  // send some log with nested data\n  shouldParseEventData: false,\n})\n\nconst logger = pino({\n  browser: {\n    write: getPinoBrowserWriteLog(splunk),\n  },\n})\n```\n\n#### Browser (development mode)\n\n```ts\nimport { PrettyConsole } from 'pino-splunk-events/lib/core/PrettyConsole'\nimport pino from 'pino'\n\nconst logger = pino({\n  browser: {\n    write: PrettyConsole.print,\n  },\n})\n```\n\n### Table logs level to splunk\n\n| Log Level | Splunk Query               |\n| --------- | -------------------------- |\n| trace     | level=Debug type=Info      |\n| debug     | level=Debug type=Info      |\n| info      | level=Important type=Info  |\n| warn      | level=Important type=Warn  |\n| error     | level=Important type=Error |\n| fatal     | level=Critical type=Error  |\n\n### Running example\n\n```bash\n# terminal 1\n$ yarn install\n$ cd example \u0026\u0026 yarn install\n# starts fake splunk server\n$ yarn server:start\n\n# terminal 2\n# sends events to fake splunk server\n$ yarn logger:start\n```\n\n### Deploy / Release new tags\n\nUse `npx chan added|fixed|etc \"my change\"`\n\nAnd after setting a changelog, run:\n\n```shell\nyarn release\n```\n\n## License\n\nReleased under [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtex%2Fpino-splunk-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvtex%2Fpino-splunk-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtex%2Fpino-splunk-events/lists"}