{"id":26930582,"url":"https://github.com/therockstorm/graylog","last_synced_at":"2025-10-27T03:03:58.714Z","repository":{"id":56415068,"uuid":"216925235","full_name":"therockstorm/graylog","owner":"therockstorm","description":"Tiny typed library to send compressed, chunked log messages to Graylog via GELF.","archived":false,"fork":false,"pushed_at":"2020-11-09T12:48:09.000Z","size":1700,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T16:19:15.031Z","etag":null,"topics":["aws-lambda","gelf","graylog","graylog2","log","logger","logging","tools","typescript","udp"],"latest_commit_sha":null,"homepage":"","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/therockstorm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-22T23:04:29.000Z","updated_at":"2020-11-09T12:48:11.000Z","dependencies_parsed_at":"2022-08-15T18:20:15.652Z","dependency_job_id":null,"html_url":"https://github.com/therockstorm/graylog","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therockstorm%2Fgraylog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therockstorm%2Fgraylog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therockstorm%2Fgraylog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therockstorm%2Fgraylog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/therockstorm","download_url":"https://codeload.github.com/therockstorm/graylog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246766952,"owners_count":20830388,"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":["aws-lambda","gelf","graylog","graylog2","log","logger","logging","tools","typescript","udp"],"created_at":"2025-04-02T06:29:38.702Z","updated_at":"2025-10-17T01:18:29.760Z","avatar_url":"https://github.com/therockstorm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graylog\n\n[![npm](https://badgen.net/npm/v/@therockstorm/graylog)](https://www.npmjs.com/package/@therockstorm/graylog)\n[![Build Status](https://travis-ci.org/therockstorm/graylog.svg?branch=master)](https://travis-ci.org/therockstorm/graylog)\n[![MIT License](https://badgen.net/github/license/therockstorm/graylog)](https://github.com/therockstorm/graylog/blob/master/LICENSE)\n[![Package Size](https://badgen.net/bundlephobia/minzip/@therockstorm/graylog)](https://bundlephobia.com/result?p=@therockstorm/graylog)\n\nTiny typed library to send compressed, chunked log messages to Graylog via GELF.\n\n## Installing\n\n```shell\nnpm install @therockstorm/graylog --save\n```\n\n## Usage\n\n```javascript\nimport { Graylog } from \"@therockstorm/graylog\"\nimport { name } from \"../package.json\"\n\n// Configure log to include defaults in each message\nconst log = new Graylog({\n  host: \"localhost\", // default\n  port: 12201, // default\n  defaults: {\n    host: name, // defaults to os.hostname()\n    myCustomField: { hello: { there: \"world\" } }\n  }\n})\n\n// Log logger errors to console\nlog.on(\"error\", err =\u003e console.error(\"@therockstorm/graylog error\", err))\n\nconst app = async (): Promise\u003cvoid\u003e =\u003e {\n  log.info(\"Hello, info.\")\n\n  // Include new defaults in each message\n  log.addDefaults({ requestId: \"myId\" })\n\n  log.warning(\"Hello, warning.\", { facility: \"MyApp\" })\n  log.error(\"Hello, error.\", new Error(\"boom\"))\n\n  // Wait for messages to send and close Graylog connection\n  await log.close()\n}\n\napp()\n```\n\n## License\n\nMIT © [Rocky Warren](https://www.rocky.dev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftherockstorm%2Fgraylog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftherockstorm%2Fgraylog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftherockstorm%2Fgraylog/lists"}