{"id":25438031,"url":"https://github.com/innopals/node-sls-logger","last_synced_at":"2025-10-10T12:23:27.383Z","repository":{"id":32981169,"uuid":"148572702","full_name":"innopals/node-sls-logger","owner":"innopals","description":"Node.js logger for aliyun SLS with minimal dependencies","archived":false,"fork":false,"pushed_at":"2023-07-07T22:28:31.000Z","size":623,"stargazers_count":16,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-05T02:48:10.921Z","etag":null,"topics":["aliyun","logger","logging","nodejs","sls"],"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/innopals.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-13T02:49:37.000Z","updated_at":"2025-03-30T00:44:59.000Z","dependencies_parsed_at":"2025-02-17T09:31:13.570Z","dependency_job_id":"c207e135-b3aa-4416-84f2-725a3b326ffc","html_url":"https://github.com/innopals/node-sls-logger","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/innopals/node-sls-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innopals%2Fnode-sls-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innopals%2Fnode-sls-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innopals%2Fnode-sls-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innopals%2Fnode-sls-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/innopals","download_url":"https://codeload.github.com/innopals/node-sls-logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innopals%2Fnode-sls-logger/sbom","scorecard":{"id":489215,"data":{"date":"2025-08-11","repo":{"name":"github.com/innopals/node-sls-logger","commit":"7a1cc96f23bc8470fb117b5bde4f7fc34bf26535"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/node.js.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/innopals/node-sls-logger/node.js.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/innopals/node-sls-logger/node.js.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-h755-8qp9-cq85","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T18:37:04.827Z","repository_id":32981169,"created_at":"2025-08-19T18:37:04.827Z","updated_at":"2025-08-19T18:37:04.827Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003897,"owners_count":26083641,"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-10T02:00:06.843Z","response_time":62,"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":["aliyun","logger","logging","nodejs","sls"],"created_at":"2025-02-17T09:28:34.282Z","updated_at":"2025-10-10T12:23:27.326Z","avatar_url":"https://github.com/innopals.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logger for Aliyun SLS\n\n[![Node.js CI](https://github.com/innopals/node-sls-logger/actions/workflows/node.js.yml/badge.svg)](https://github.com/innopals/node-sls-logger/actions/workflows/node.js.yml)\n[![NPM Version](https://img.shields.io/npm/v/sls-logger.svg)](https://npmjs.org/package/sls-logger)\n[![NPM Downloads](https://img.shields.io/npm/dm/sls-logger.svg)](https://npmjs.org/package/sls-logger)\n\nThe nodejs logger for aliyun SLS with minimum dependencies.\n\n## Configuration\n\n| Config Name   | Default | Type            | Required | Description                                                  |\n| ------------- | ------- | --------------- | -------- | ------------------------------------------------------------ |\n| accessKey     |         | string          | true     | Your access key to SLS                                       |\n| accessSecret  |         | string          | true     | Your secret to access SLS                                    |\n| securityToken |         | string          | false    | Your STS security token                                      |\n| endpoint      |         | string          | true     | Your SLS endpoint, e.g. example.cn-hangzhou.log.aliyuncs.com |\n| logstore      |         | string          | true     | Your logstore name                                           |\n| source        |         | string          | false    | Source for your logs                                         |\n| topic         |         | string          | false    | Topic for your logs                                          |\n| hashkey       |         | string          | false    |                                                              |\n| compress      | false   | boolean         | false    | Use lz4 to compress log payload                              |\n| tags          |         | key-value pair  | false    | Extra tags for your logs                                     |\n| level         | INFO    | string / number | false    | Log level                                                    |\n| disabled      | false   | boolean         | false    | Disable sls and log to stdout                                |\n\nNote: if your configuration is incorrect(fail to get logstore), all logs will be written to stdout.\n\n## Usage\n\n```javascript\nconst logger = new SlsLogger({\n  endpoint: \"example.cn-hangzhou.log.aliyuncs.com\",\n  accessKey: \"your_access_key\",\n  accessSecret: \"your_access_secret\",\n  logstore: \"your_logstore\",\n  source: \"test\",\n  topic: \"test\",\n  compress: true,\n  level: \"INFO\",\n  disabled: true,\n});\n\nlogger.info(\n  \"Hello world!\",\n  new Date(),\n  function () { \"abc\"; },\n  { a: 1, b: { c: 1 }, d: \"123\", e: false },\n  new Object(),\n  [1, 2, 3, \"abc\", false, null, undefined, new Error(\"error1\")],\n  SlsLogger.createField(\"module\", \"main\"),\n  1234,\n  true,\n  null,\n  undefined,\n  new Error(\"error2\")\n);\n```\n\nAnd you can pass a function as log message generator to improve performance; it will not be called unless the log level is enabled.\n\n``` js\nlogger.debug(\n  () =\u003e \"Debug message from generator.\",\n  SlsLogger.createField(\"module\", \"debug\")\n);\n// Set log level on the fly, e.g. through user signal or rest api.\nlogger.setLevel(\"DEBUG\");\n```\n\n## Contributing\n\nThis project welcomes contributions from the community. Contributions are accepted using GitHub pull requests. If you're not familiar with making GitHub pull requests, please refer to the [GitHub documentation \"Creating a pull request\"](https://help.github.com/articles/creating-a-pull-request/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnopals%2Fnode-sls-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finnopals%2Fnode-sls-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnopals%2Fnode-sls-logger/lists"}