{"id":14989572,"url":"https://github.com/joelalejandro/logepi","last_synced_at":"2025-08-26T14:27:47.456Z","repository":{"id":33981843,"uuid":"165300093","full_name":"joelalejandro/logepi","owner":"joelalejandro","description":"A tiny (Togepi-sized) package for logs, built on top of Winston.","archived":false,"fork":false,"pushed_at":"2023-01-04T20:59:17.000Z","size":1619,"stargazers_count":3,"open_issues_count":15,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-09T10:14:34.299Z","etag":null,"topics":["express-middleware","koa-middleware","logger","logger-middleware","logging","pokemon","winston"],"latest_commit_sha":null,"homepage":null,"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/joelalejandro.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":"2019-01-11T19:46:05.000Z","updated_at":"2021-03-31T19:26:03.000Z","dependencies_parsed_at":"2023-01-15T04:01:18.463Z","dependency_job_id":null,"html_url":"https://github.com/joelalejandro/logepi","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/joelalejandro/logepi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelalejandro%2Flogepi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelalejandro%2Flogepi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelalejandro%2Flogepi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelalejandro%2Flogepi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joelalejandro","download_url":"https://codeload.github.com/joelalejandro/logepi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelalejandro%2Flogepi/sbom","scorecard":{"id":526780,"data":{"date":"2025-08-11","repo":{"name":"github.com/joelalejandro/logepi","commit":"dd45793835456070b9a06fa0d74219128b0cfdad"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"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":"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 1/25 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":"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":"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 '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 2 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":0,"reason":"32 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-fwr7-v2mv-hh25","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-257v-vj4p-3w2h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","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-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","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-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","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"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-20T04:36:31.195Z","repository_id":33981843,"created_at":"2025-08-20T04:36:31.195Z","updated_at":"2025-08-20T04:36:31.195Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272229003,"owners_count":24895904,"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-08-26T02:00:07.904Z","response_time":60,"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":["express-middleware","koa-middleware","logger","logger-middleware","logging","pokemon","winston"],"created_at":"2024-09-24T14:18:35.467Z","updated_at":"2025-08-26T14:27:47.413Z","avatar_url":"https://github.com/joelalejandro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg align=\"left\" src=\"https://i.imgur.com/PTzwjQY.jpg\" height=\"150px\" /\u003e\n\n\u003ch1 style=\"margin-left:160px\"\u003eLogepi\u003c/h1\u003e\n\n\u003ch2 style=\"margin-left:160px\"\u003eA tiny, Togepi-sized, logging library for Node.js apps \u0026 APIs.\u003c/h2\u003e\n\n\u003cbr clear=\"left\"/\u003e\n\n## How to install\n\n### Using npm\n\n```shell\n$ npm install --save logepi\n```\n\n### Using yarn\n\n```shell\n$ yarn install logepi\n```\n\n## How to use\n\nThe library is comprised of two major components:\n\n- A `Log` static class which creates an instance of a [Winston](https://github.com/winstonjs/winston) logger, exposing several methods to output messages with different loglevels.\n- `Middleware` functions to add automatic logging of request/response flows for HTTP servers. Currently the library supports [Koa](https://koajs.com) and [Express](https://expressjs.com/).\n\nThere's also a [TypeScript declaration](./index.d.ts) file available for TS-based apps.\n\n### Using the `Log` API\n\n#### Importing the library\n\n```js\n// commonjs style\nconst { Log } = require(\"logepi\");\n\n// ES modules style\nimport { Log } from \"logepi\";\n```\n\n#### Log an error\n\n```js\nLog.error(\"An error was found\", { tags: { process: \"foo\" } });\n```\n\n#### Log a warning\n\n```js\nLog.warning(\"Careful!\", { tags: { process: \"foo\" } });\n```\n\n#### Log at INFO level\n\n```js\nLog.info(\"Hopefully someone will read this.\", { tags: { process: \"foo\" } });\n```\n\n#### Log at VERBOSE level\n\n```js\nLog.verbose(\"Now I'm all blah-by.\", { tags: { process: \"foo\" } });\n```\n\n#### Log at DEBUG log\n\n```js\nLog.debug(\"I've said too much!\", { tags: { process: \"foo\" } });\n```\n\n### Setting up an output level\n\nIn order to filter what messages are printed to the console transport, you can use the `Log.setOutputLevel()` method:\n\n```js\n// Limit messages to \"error\" level.\nLog.setOutputLevel(\"error\");\n```\n\nYou can also use the `LogLevel` enum, with uppercased keys (`INFO`, `WARN`, `ERROR`, `VERBOSE`, `DEBUG`).\n\n### Using the Koa middleware\n\n#### Import the library\n\n```js\n// commonjs style\nconst { KoaLoggingMiddleware } = require(\"logepi\");\n\n// ES modules style\nimport { KoaLoggingMiddleware } from \"logepi\";\n```\n\n#### Inject it into your app\n\n```js\napp\n    .use(...)\n    // ...make sure it's the *last* middleware...\n    .use(KoaLoggingMiddleware());\n```\n\n### Using the Express middleware\n\n#### Import the library\n\n```js\n// commonjs style\nconst { ExpressLoggingMiddleware } = require(\"logepi\");\n\n// ES modules style\nimport { ExpressLoggingMiddleware } from \"logepi\";\n```\n\n#### Inject it into your app\n\n```js\napp\n    .use(...)\n    // ...make sure it's the *last* middleware...\n    .use(ExpressLoggingMiddleware());\n```\n\n### Adding tags to logs\n\nLogepi offers a way to inject tagged data in a logline, with the format `[key:value]`. When logging, use the `tags` key on the `data` argument of any of the Log API methods. There's an example right in the next section.\n\n### Configuring logging middlewares\n\nAll middlewares expose the same configuration object:\n\n```js\n  /**\n   * Allows to configure log levels for requests and responses.\n   */\n  logLevels: {\n    /**\n     * Sets the log level for all incoming requests.\n     */\n    request: \"info\",\n\n    /**\n     * Sets the log level for all outgoing responses, according to their status code.\n     */\n    response: {\n      status2xx: \"info\",  // For 200-399 codes\n      status4xx: \"warn\",  // For 400-499 codes\n      status5xx: \"error\"  // For 500-599 codes\n    }\n  }\n```\n\n## How does it look?\n\n_**Note:** Logs are single-lined, but for clarity's sake, they're shown in multiple lines._\n\n### Manual logging\n\n```js\nLog.info(\"API is now ready\", { tags: { port } });\n```\n\noutputs:\n\n```\n[timestamp:2019-01-11T21:04:41.915Z]\n[level:info]\n[message:API is now ready]\n[port:9000]\n```\n\n### Incoming request\n\n```\n[timestamp:2019-01-11T21:00:45.442Z]\n[level:info]\n[message:IncomingRequest]\n[url:/api/apps]\n[queryParams:undefined]\n[body:{}]\n[headers:{\"host\":\"localhost:9000\",\"connection\":\"keep-alive\",\"upgrade-insecure-requests\":\"1\",\"user-agent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36\",\"accept\":\"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\"accept-encoding\":\"gzip, deflate, br\",\"accept-language\":\"es-ES,es;q=0.9,en;q=0.8,en-US;q=0.7\"}]\n```\n\n### Outgoing response\n\n```\n[timestamp:2019-01-11T21:00:45.446Z]\n[level:info]\n[message:OutgoingResponse]\n[status:200]\n[body:{\"ok\":true,\"data\":{\"foo\":true}}]\n[headers:{\"host\":\"localhost:9000\",\"connection\":\"keep-alive\",\"upgrade-insecure-requests\":\"1\",\"user-agent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36\",\"accept\":\"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\"accept-encoding\":\"gzip, deflate, br\",\"accept-language\":\"es-ES,es;q=0.9,en;q=0.8,en-US;q=0.7\"}]\n```\n\n## Issues\n\nFeel free to report any [issues](https://github.com/joelalejandro/logepi/issues) and we'll figure out a way to make it work.\n\n## Want to contribute?\n\nThat's great! Open an issue first and let's discuss what you want to add or, by all means, fork this project! :)\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelalejandro%2Flogepi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoelalejandro%2Flogepi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelalejandro%2Flogepi/lists"}