{"id":39015761,"url":"https://github.com/trussle/trussle-logging","last_synced_at":"2026-01-17T17:24:47.874Z","repository":{"id":57380342,"uuid":"69294878","full_name":"trussle/trussle-logging","owner":"trussle","description":"A simple logging library by Trussle.","archived":false,"fork":false,"pushed_at":"2024-03-25T12:18:15.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-08-19T18:37:32.518Z","etag":null,"topics":["javascript","logging"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trussle.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":"2016-09-26T21:37:07.000Z","updated_at":"2024-03-25T12:18:14.000Z","dependencies_parsed_at":"2022-08-28T21:22:32.832Z","dependency_job_id":null,"html_url":"https://github.com/trussle/trussle-logging","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/trussle/trussle-logging","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trussle%2Ftrussle-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trussle%2Ftrussle-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trussle%2Ftrussle-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trussle%2Ftrussle-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trussle","download_url":"https://codeload.github.com/trussle/trussle-logging/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trussle%2Ftrussle-logging/sbom","scorecard":{"id":899993,"data":{"date":"2025-08-11","repo":{"name":"github.com/trussle/trussle-logging","commit":"5a3e3d83a0665dfa777db03db5d46c6ac973e06f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/19 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":"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":"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":-1,"reason":"no workflows found","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: 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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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 28 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"}}]},"last_synced_at":"2025-08-24T15:12:49.988Z","repository_id":57380342,"created_at":"2025-08-24T15:12:49.988Z","updated_at":"2025-08-24T15:12:49.988Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28512890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","logging"],"created_at":"2026-01-17T17:24:47.194Z","updated_at":"2026-01-17T17:24:47.852Z","avatar_url":"https://github.com/trussle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trussle-logging\n\n*Maintained by [@jonnyarnold](https://github.com/jonnyarnold/)*\n\nA simple library for all things logging.\n\n\n## Usage\n\n```js\nimport buildLogger from \"trussle-logging\";\nconst logger = buildLogger(\"MyComponent\");\n\nlogger.info(\"Testing, testing, 123!\");\n```\n\nYou will need to set the **NODE_LOG_LEVEL** environment variable to choose the verbosity of the logger.\n\n```bash\nexport NODE_LOG_LEVEL=DEBUG\n```\n\n## Advanced Usage\n\nThere are several advanced usage options:\n\n```js\nimport buildLogger from \"trussle-logging\";\nconst logger = buildLogger({\n  source: \"ComponentName\", // Name for component; useful for navigating to your js file\n  transport: new TransportClass(), // Logging transport. Can also be an array: default is console transport\n  level: \"INFO\", // See Log Levels; if not set the the NODE_LOG_LEVEL environment will be used.\n  formatter: (logData) =\u003e `${logData.message}`, // See Formatters\n  variants: [] // See Variants\n}\n```\n\n### Log Levels\n\n* TRACE\n* DEBUG\n* INFO\n* WARN\n* ERROR\n* CRITICAL\n* NONE\n\n### Transports\n\nThe default Transport logs to the console. If you want to write to your own transport then it will have to comply with the following interface:\n\n```js\n{\n  trace(message),\n  debug(message),\n  info(message),\n  warn(message),\n  error(message),\n  critical(message)\n}\n```\n\n### Templates\n\nTemplates are functions that take a logData object and return the output to be sent to the transport.\n\nThe logData object has these properies\n\n```js\n{\n  timestamp, // A moment object of the current utc time\n  source, // The source component of the log\n  level, //The log level\n  message // The original log message\n}\n```\n\nFor more info on moment objects check out [momentjs](http://momentjs.com/).\n\nIf no formatter is chosen then the default will be chosen.\n```js\n(logData) =\u003e `(${logData.source}) [${logData.level}] ${logData.message}`;\n```\n\n### Multiple Logs\n\nIf your usecase requires you to have multiple logs - separate log files for INFO and ERROR logs for instance then you can add a variants property to your config; this will create a wrapper logger that will delegate to multiple loggers.\n\n*(Only the ConsoleTransport supports variants at this time, so if you need to log to a file you'll need to roll your own transport class.)*\n\n```js\n{\n  source: \"ComponentName\",\n  level: \"INFO\",\n  variants: [\n    {\n      level: \"ERROR\",\n      transport: new MyCustomTransport()\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrussle%2Ftrussle-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrussle%2Ftrussle-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrussle%2Ftrussle-logging/lists"}