{"id":27110097,"url":"https://github.com/jirufik/jrf-graylog","last_synced_at":"2025-04-06T23:49:29.838Z","repository":{"id":57282739,"uuid":"289741102","full_name":"jirufik/jrf-graylog","owner":"jirufik","description":"A package that implements the udp logging client for Graylog","archived":false,"fork":false,"pushed_at":"2020-10-05T15:43:43.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T22:46:16.449Z","etag":null,"topics":["client","graylog","jrf","jrf-graylog","log"],"latest_commit_sha":null,"homepage":"","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/jirufik.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}},"created_at":"2020-08-23T18:08:47.000Z","updated_at":"2020-10-05T15:43:45.000Z","dependencies_parsed_at":"2022-09-18T16:02:25.985Z","dependency_job_id":null,"html_url":"https://github.com/jirufik/jrf-graylog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirufik%2Fjrf-graylog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirufik%2Fjrf-graylog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirufik%2Fjrf-graylog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirufik%2Fjrf-graylog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jirufik","download_url":"https://codeload.github.com/jirufik/jrf-graylog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247569134,"owners_count":20959758,"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":["client","graylog","jrf","jrf-graylog","log"],"created_at":"2025-04-06T23:49:29.280Z","updated_at":"2025-04-06T23:49:29.817Z","avatar_url":"https://github.com/jirufik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jrf-graylog\n\n## Description \n\nA package that implements the `udp` logging client for [Graylog](https://www.graylog.org/)\n\n## Example\n\n```js\nconst Graylog = require('jrf-graylog');\n\nconst graylog = new Graylog({\n  address: 'graylog.server.address',\n  host: 'my-web-project.com',\n  node: 'dev.log.test',\n  compress: false\n});\n\ngraylog.log('String line log');\ngraylog.log({code: 1245, label: 'label'});\ngraylog.log({code: 1245, label: 'label'}, graylog.level.DEBUG);\ngraylog.log({code: 1245, label: 'label', level: 6});\ngraylog.log({code: 1245, label: 'label', level: graylog.level.ALERT});\ngraylog.log({code: 1245, label: 'label', level: 'error'});\n\ngraylog.log({\n  data: ['sss', 'sfdsf', 'sfddsf', {odd: {a: 'a', b: {b: [{a: 'a', b: {a: 'a'}}, 'ss']}}}],\n  message: 'array data'\n});\n\nlet error;\ntry {\n  throw new Error('test error');\n} catch (e) {\n  error = e;\n}\ngraylog.error(error);\ngraylog.error({message: 'exec test error', error});\n\ngraylog.info('info');\ngraylog.debug('debug');\ngraylog.emergency('emergency');\ngraylog.alert('alert');\ngraylog.critical('critical');\ngraylog.notice('notice');\n```\n\n## Levels\n\n`graylog.level[levelNameUppercase]`\n\n| code | name | description |\n|---|---|---|\n| 0 | emergency | system is unusable |\n| 1 | alert | action must be taken immediately |\n| 2 | critical | critical conditions |\n| 3 | error | error conditions |\n| 4 | warning | warning conditions |\n| 5 | notice | normal, but significant, condition |\n| 6 | info | informational message |\n| 7 | debug | debug level message |\n\n## Constructor\n\n| name | type | default | description |\n|---|---|---|---|\n| port | number | 12201 | port on server |\n| address | string | localhost | Address Graylog server |\n| host | string |  | client hostname |\n| node | string | node | client node name |\n| defaultLevel | string/number/Object | INFO | default log level |\n| compress | boolean | true | log data compression |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjirufik%2Fjrf-graylog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjirufik%2Fjrf-graylog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjirufik%2Fjrf-graylog/lists"}