{"id":17041944,"url":"https://github.com/cloudhead/node-syslog","last_synced_at":"2025-10-08T23:05:24.824Z","repository":{"id":1353920,"uuid":"1301385","full_name":"cloudhead/node-syslog","owner":"cloudhead","description":"a syslog-ng TCP client, with basic fault-tolerance.","archived":false,"fork":false,"pushed_at":"2018-01-27T10:49:41.000Z","size":6,"stargazers_count":33,"open_issues_count":5,"forks_count":22,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-08T23:05:24.031Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/cloudhead.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":"2011-01-28T01:53:59.000Z","updated_at":"2024-03-15T21:06:59.000Z","dependencies_parsed_at":"2022-07-07T03:03:20.330Z","dependency_job_id":null,"html_url":"https://github.com/cloudhead/node-syslog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cloudhead/node-syslog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fnode-syslog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fnode-syslog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fnode-syslog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fnode-syslog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudhead","download_url":"https://codeload.github.com/cloudhead/node-syslog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fnode-syslog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000732,"owners_count":26082862,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-14T09:14:16.639Z","updated_at":"2025-10-08T23:05:24.794Z","avatar_url":"https://github.com/cloudhead.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nnode-syslog\n===========\n\n\u003e Syslog-ng TCP client for node, with basic fault-tolerance.\n\ninstallation\n------------\n\n    $ npm install syslog\n\nsynopsis\n--------\n    \n    var syslog = require('syslog');\n    var logger = syslog.createClient(514, 'localhost');\n\n    logger.info(\"ping!\");\n\nlog levels\n----------\n\nIn increasing order of severity:\n\n- debug\n- info\n- notice\n- warning\n- error\n- crit\n- alert\n- emerg\n\nThese are available as methods on Client, ex: `logger.crit()`.\n\nYou may also call the `log` method, and pass the level as the 2nd argument:\n\n    logger.log('fnord!', syslog.LOG_CRIT);\n\nThe default level is `info`.\n\nconfiguration\n-------------\n\nYou will have to configure your syslog server to accept TCP connections.\nThis is usually done in `/etc/syslog-ng.conf`. Let's say you have an app called `fnord`,\nthe configuration would look something like this:\n\n    source tcp_s {\n      tcp(ip(0.0.0.0) port(514) max-connections(256));\n    };\n    destination fnord_d {\n      file(\"/var/log/fnord.log\");\n    };\n    log { source(tcp_s); destination(fnord_d); };\n\nIf you have multiple apps which need to log via TCP, you can specify filters, as such:\n\n    filter fnord_f { program(\"fnord\"); };\n\nThen modify the log statement to read:\n\n    log { source(tcp_s); filter(fnord_f); destination(fnord_d); };\n\nNow if you have another app, called `bnord`, create similar `destination` and `filter` configurations for it,\nand specify a new log statement, with the same `source`:\n\n    log { source(tcp_s); filter(bnord_f); destination(bnord_d); };\n\nFor this to work, you have to make sure you set the `process.title` variable in your node app.\n\n    process.title = 'fnord';\n\nAlternatively, you can pass it as an option to `createClient`:\n\n    syslog.createClient(514, 'localhost', { name: 'fnord' });\n\nlicense\n-------\n\nSee `LICENSE` file.\n\n\u003e Copyright (c) 2011 Alexis Sellier\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudhead%2Fnode-syslog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudhead%2Fnode-syslog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudhead%2Fnode-syslog/lists"}