{"id":50671102,"url":"https://github.com/ibrahidm/logger-lite","last_synced_at":"2026-06-08T11:04:17.518Z","repository":{"id":57404212,"uuid":"356974512","full_name":"ibrahidm/logger-lite","owner":"ibrahidm","description":"Your-Logger-Lite is a simple tool that provides your ExpressJS applications with basic logging capabilities and traceability by leveraging middleware.","archived":false,"fork":false,"pushed_at":"2021-04-19T19:11:12.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T01:22:46.725Z","etag":null,"topics":["backend","express","logger","logger-middleware","logging","logging-library","middleware","nodejs","tool"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ibrahidm.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":"2021-04-11T20:39:49.000Z","updated_at":"2021-06-27T17:39:07.000Z","dependencies_parsed_at":"2022-09-11T00:51:08.434Z","dependency_job_id":null,"html_url":"https://github.com/ibrahidm/logger-lite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ibrahidm/logger-lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrahidm%2Flogger-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrahidm%2Flogger-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrahidm%2Flogger-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrahidm%2Flogger-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibrahidm","download_url":"https://codeload.github.com/ibrahidm/logger-lite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrahidm%2Flogger-lite/sbom","scorecard":{"id":479429,"data":{"date":"2025-08-11","repo":{"name":"github.com/ibrahidm/logger-lite","commit":"c6338dd5636f127b3857462a0a934a50303adb92"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/13 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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"Vulnerabilities","score":0,"reason":"31 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-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"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-19T16:13:20.129Z","repository_id":57404212,"created_at":"2025-08-19T16:13:20.129Z","updated_at":"2025-08-19T16:13:20.129Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34059182,"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-06-08T02:00:07.615Z","response_time":111,"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":["backend","express","logger","logger-middleware","logging","logging-library","middleware","nodejs","tool"],"created_at":"2026-06-08T11:04:14.440Z","updated_at":"2026-06-08T11:04:17.514Z","avatar_url":"https://github.com/ibrahidm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Introduction\n\n**Your-Logger-Lite** is a simple tool that provides your ExpressJS applications with basic logging capabilities and traceability by leveraging middleware.\n\n**Your-Logger-Lite** is built using typescript and ships with type support. It is configured to allow for easy implementation both with commonJS and ES6.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Table of Contents](#table-of-contents)\n- [Installation](#installation)\n- [Getting Started:](#getting-started)\n\t- [Environment Variables](#environment-variables)\n\t- [Examples](#examples)\n\t- [ES6](#es6)\n\t- [CommonJS](#commonjs)\n- [General Use](#general-use)\n\n## Installation\n\nUisng **yarn**:\n\n``` \n$ yarn add your-logger-lite \n```\n\n\nUsing **npm**:\n\n``` \n$ npm install your-logger-lite \n```\n\n\n## Getting Started:\n\n  ### Environment Variables\n\n**your-logger-lite** depends on an environment variable named `LOG_LEVEL`. The concept of log-level will be discussed in further detail a little later. In brief, log-level allows some basic, global, environment-bound control over whether or not certain actions are logged. **your-logger-lite**'s `loggerMiddleware` accesses the `LOG_LEVEL` by calling `process.env.LOG_LEVEL`, as such it is important to configure this variable. The default level is set to **4**, so that if you fail to provide this environment variable, the logger will still function and will show all log levels.\n\n### Examples\n\nInitialize your NodeJS + ExpressJS application as you normally would. Import both ` loggerMiddleware` and `traceMiddleware` from `'your-logger-lite'`. Add these pieces of middleware using **`app.use`**. It is important that you initialize them in this order: \n```\napp.use(traceMiddleware)\napp.use(loggerMiddleware)\n```\n Here is an arbitrary example of a basic express server set-up, shown both using [ES6](#es6) and [commonJS](#commonjs): \n\n### ES6\n```\n// index.js\n\nimport express from 'express';\nimport cors from 'cors;\nimport { loggerMiddleware, traceMiddleware } from 'your-logger-lite'\n\n\t// any other imports \u0026 configs such as database connections\n\nconst app = express()\n\napp.use(express.json());\napp.use(cors()); \napp.use(express.urlencoded({ extended: true }));\n\napp.use(traceMiddleware)\napp.use(loggerMiddleware)\n\n\t// your endpoints \n\t// your app.listen()\n\n```\n\n### CommonJS\n\n```\n// index.js\n\nvar express = require('express')\nvar cors = require('cors')\nvar logger = require('your-logger-lite')\n\n\t// any other imports \u0026 configs such as database connections\n\nvar app = express()\n\napp.use(express.json());\napp.use(cors());\napp.use(express.urlencoded({ extended: true }));\n\napp.use(logger.traceMiddleware)\napp.use(logger.loggerMiddleware)\n\n\t// your endpoints\n\t// your app.listen()\n\t\n```\n\nWith this basic setup, all of your routes will already have some level of automatic logging. For example, consider the following arbitrary end-point: \n\n```\napp.get('/health', (req, res) =\u003e {\n\tres.send('OK')\n});\n\napp.listen(process.env.PORT || 3000, () =\u003e {\n\tconsole.log(`App running on port ${process.env.PORT}`)\n});\n```\n\nWith the middleware properly initialized, the **console** should show the following: \n```\nApp running on port 3000\nIP: ::1, HOST: localhost, METHOD: GET\n```\n\nWhile logging this kind of information when in development on a local server is somewhat contrived, this kind of information can be helpful when the application / API is accessible to multiple clients when in production. \n\n## General Use\n\n**Your-Logger-Lite** was designed with the handler-controller paradigm in mind, but it can be injected virtually anywhere. Here is an example of how you might use it to add logging to an arbitrary handler: \n\n```\n// foo.route.js\nimport { Router } from 'express'\nimport { handleCreateFoo } from '../handlers/foo.handler'\n\nconst fooRouter = Router()\n\nfooRouter.post('/', handleCreateFoo)\n\n---\n// foo.handler.js\n\nexport const handleCreateFoo = async (req, res) =\u003e {\n\tconst { context } = req;\n\tconst { logger } = context;\n\tconst self = handleCreateFoo.name;\n\tlogger.start(self);\n\tlet newFoo;\n\n\ttry {\n\t\tnewFoo = await createFoo({ req.body, context })\n\t} catch (e) {\n\t\tlogger.error(e, 500, self)\n\t\treturn res.status(500).send(`Could not create newFoo with error: ${e})\n\t}\n\n\tlogger.end(self)\n\treturn res.status(200).send(newFoo)\n}\n---\n// foo.contollers.js\n\n\t// createFoo controller implementation\n\n```\n\nAll that logger.start() does is call logger.info() and logger.time() (while logger.end() calls logger.info() and logger.timeEnd()) which can be called independently, depending on your use-case, giving you further glanularity of control. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibrahidm%2Flogger-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibrahidm%2Flogger-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibrahidm%2Flogger-lite/lists"}