{"id":25931129,"url":"https://github.com/teragrep/jsa_01","last_synced_at":"2026-05-30T21:31:28.643Z","repository":{"id":64927728,"uuid":"526514016","full_name":"teragrep/jsa_01","owner":"teragrep","description":"Teragrep RELP appender for Log4js","archived":false,"fork":false,"pushed_at":"2024-01-09T11:59:56.000Z","size":82,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-30T22:38:48.310Z","etag":null,"topics":["javascript","log4js","log4js-node","relp","relp-client","syslog","teragrep"],"latest_commit_sha":null,"homepage":"https://teragrep.com","language":"JavaScript","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/teragrep.png","metadata":{"files":{"readme":"README.adoc","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-19T07:55:33.000Z","updated_at":"2025-01-28T11:49:00.000Z","dependencies_parsed_at":"2024-10-03T23:00:39.121Z","dependency_job_id":"0abaa7cb-4ae3-4f1a-a16f-e042a079a1a9","html_url":"https://github.com/teragrep/jsa_01","commit_stats":{"total_commits":23,"total_committers":5,"mean_commits":4.6,"dds":0.3913043478260869,"last_synced_commit":"f1ac8e8f2a02eeb620d61a6525d692dc4ad7b633"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/teragrep/jsa_01","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fjsa_01","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fjsa_01/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fjsa_01/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fjsa_01/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teragrep","download_url":"https://codeload.github.com/teragrep/jsa_01/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fjsa_01/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33711018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"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":["javascript","log4js","log4js-node","relp","relp-client","syslog","teragrep"],"created_at":"2025-03-03T23:57:41.804Z","updated_at":"2026-05-30T21:31:28.620Z","avatar_url":"https://github.com/teragrep.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# javascript appender\n\nCreate appender for log4js-node to enable RELP usage from node.js applications.\n\nUser Story: \nAs a developer I would like to use jsa_01 to push log messages over relp to a compatible relp-server with syslog envelope\n\n== Specs\n\nRequirements Backlog\n\n[options=\"header,footer\"]\n|=======================\n|#  |Title      |User Story |Importance |Status\n|1    |Rebind    |Rebind of the rlp_02 connection must be done after configureable amount of messages | OPTIONAL |Open\n|2    |Syslog     |Wrap messages in syslog envelope |Must Have |WIP\n|3    |RELP    |Use rlp_02 library  |Must Have |Done\n|4    |Lossless|Retry indefinitely and do not lose messages |Must Have |Open\n|5    |Robust|Processing must not hang indefinitely due to techinical issues but rather retry new connection |Must Have |Open\n|6    |Source Data    |Must include origin data in syslog structure-data within source-metadata | Must Have |WIP\n|7    |Originator     |Must include hostname within new syslog structured-data (SD) so utilization systems can utilize it |Must Have |Done\n|8    |app-name    |Syslog app-name must be configureable  |Must Have |Done\n|9    |hostname|syslog hostname must be configureable |Must Have |Done\n|10   |server port|Server ports need to be configureable |Must Have |Done\n|11   |Server address    |server address needs to be configureable | Must Have |Done\n|12   |Expose error SyslogMessage     |Erros(expecptions) must not be hidden |Must Have |Open\n|13   |Extra libraries    |Do not use extra libraries  |Must Have |Open\n|14   |Variable checking|Check variables provided via configuration to be valid and raise errors if not in initilization |Must Have |Done\n|15   |Debug flags|Allow passing debulg flags via configuration |OPTIONAL |Open\n\n|=======================\n\n== High-level Architecture\n\nimage::https://github.com/teragrep/jsa_01/blob/base-feat/images/JSA_01.png[]\n\n== Implementation\n\nThe jsAppender to push log messages over relp to a compatible relp-server with syslog envelope.\n\nUse following components for: \n\n* rlp_02: RELP connection \n* rlo_08: Generate the Syslog message \n* Java-relp-server-demo: RELP compatible server (tested on) \n\nHow to implement:\n\n* asynchronus behaviour completely controlled by the Jasmine async works.\n+\n[source,node]\n-----------------\nnpm install \n-----------------\n\n* Module usage:\n+ \nThe appender uses the rlo_08 for handling formatting log messages and rlp_02 to send the log event message to the RELP Server.\n+\n[source,javascript]\n-----------------\nconst { SyslogMessage, Facility, SDElement, SDParam, Severity } = require('@teragrep/rlo_08')\nconst { RelpConnection, RelpBatch } = require('@teragrep/rlp_02')\n-----------------\n\n* Build\n+\n[source,java]\n-----------------\nmvn clean package\n-----------------\n\n* Optional tips:\n+\nasync waterfall method also possible for run in the node engine (need to adjust the code).\n\n== Configuration\n\n* `*_type_*` - `*_jsAppender_*`\n* `*_hostname_*` - `*_string_*` (defaults to os.hostname()) - origin of the log messages\n* `*_appname_*` - `*_string_*` \n* `*_serverAddress_*` - `*_string_*`\n* `*_serverPort_*` - `*_integer_*` (defaults to 1601) - Port of the relp server is listening in\n\n\n== Example (default config)\n[source,javascript]\n-----------------\n\nlog4js.configure( {\n    appenders: {jsa: { type: jsAppender, appName: 'teragrep' },\n    console: { type: 'console' },\n  },\n  categories: {\n    jsa: { appenders: ['jsa'], level: 'error' },\n    default: { appenders: ['jsa'], level: 'trace' },\n  },\n})\n-----------------\n\nThis configuration will send the log event messages to the RELP Server.\n\n== Contributing\n \n// Change the repository name in the issues link to match with your project's name\n \nYou can involve yourself with our project by https://github.com/teragrep/jsa_01/issues/new/choose[opening an issue] or submitting a pull request.\n \nContribution requirements:\n \n. *All changes must be accompanied by a new or changed test.* If you think testing is not required in your pull request, include a sufficient explanation as why you think so.\n. Security checks must pass\n. Pull requests must align with the principles and http://www.extremeprogramming.org/values.html[values] of extreme programming.\n. Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).\n \nRead more in our https://github.com/teragrep/teragrep/blob/main/contributing.adoc[Contributing Guideline].\n \n=== Contributor License Agreement\n \nContributors must sign https://github.com/teragrep/teragrep/blob/main/cla.adoc[Teragrep Contributor License Agreement] before a pull request is accepted to organization's repositories.\n \nYou need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep's repositories. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteragrep%2Fjsa_01","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteragrep%2Fjsa_01","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteragrep%2Fjsa_01/lists"}