{"id":48615344,"url":"https://github.com/maxcharm093/module-logger-elasticsearch","last_synced_at":"2026-04-09T01:33:54.292Z","repository":{"id":311487148,"uuid":"1043845673","full_name":"maxcharm093/module-logger-elasticsearch","owner":"maxcharm093","description":"Nestjs Elasticsearch Logger Module","archived":false,"fork":false,"pushed_at":"2025-08-24T18:38:22.000Z","size":376,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"dependabot/npm_and_yarn/ajv-6.12.6","last_synced_at":"2025-08-24T22:50:32.812Z","etag":null,"topics":["nestjs"],"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/maxcharm093.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-24T18:31:50.000Z","updated_at":"2025-08-24T18:53:31.000Z","dependencies_parsed_at":"2025-08-24T22:50:40.068Z","dependency_job_id":"f21fd5c1-3292-40f5-8fbe-2715b4ca0442","html_url":"https://github.com/maxcharm093/module-logger-elasticsearch","commit_stats":null,"previous_names":["maxcharm093/module-logger-elasticsearch"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/maxcharm093/module-logger-elasticsearch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcharm093%2Fmodule-logger-elasticsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcharm093%2Fmodule-logger-elasticsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcharm093%2Fmodule-logger-elasticsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcharm093%2Fmodule-logger-elasticsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxcharm093","download_url":"https://codeload.github.com/maxcharm093/module-logger-elasticsearch/tar.gz/refs/heads/dependabot/npm_and_yarn/ajv-6.12.6","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcharm093%2Fmodule-logger-elasticsearch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["nestjs"],"created_at":"2026-04-09T01:33:53.631Z","updated_at":"2026-04-09T01:33:54.264Z","avatar_url":"https://github.com/maxcharm093.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nestjs Elasticsearch Logger\n\n## Installation\n\n```bash\nnpm install @nestjs.pro/logger-elasticsearch\n```\n\nor\n\n```bash\nyarn add @nestjs.pro/logger-elasticsearch\n```\n\n## Setup\n\n### Elasticsearch\n\nFirst we need an elasticsearch instance (and optionally kibana for viewing logs).This repo comes with a `docker-compose.yaml` file to make things\neasy for development. Simply `docker-compose up -d`.\n\n### Bootstrapping\n\nImport the `ElasticsearchLoggerModule` in your `AppModule` passing it a few configuration options:\n\n```typescript\n@Module({\n\n    imports: [\n\n        ElasticsearchLoggerModule.forRoot({\n\n            name: 'my-awesome-app',\n            index: 'logs',\n            stdout: true,\n            elasticsearchClientOptions: { nodes: 'http://localhost:9200' }\n\n        })\n\n    ]\n\n})\nexport class AppModule {\n\n}\n```\n\nFor more configuration options see https://github.com/nestjspro/module-logger-elasticsearch/blob/master/src/ElasticsearchLoggerOptions.ts.\n\n## Usage\n\n## Method Logging\n\nBefore we can log messages you simply need to inject the `ElasticsearchLoggerService` wherever you need to log messages at.\n\nExample:\n\n```typescript\n@Injectable()\nexport class MyServiceOrController {\n\n    public constructor(private readonly elasticsearchLoggerService: ElasticsearchLoggerService) {\n\n    }\n\n    public someMethod(): void {\n\n        // do work\n        this.elasticsearchLoggerService.info('someMethod() called!');\n\n    }\n\n}\n```\n\n## Controller Request Logging\n\nYou can optionally configure an interceptor and use the `ElasticsearchRequestInterceptor` to automagically log all of \nyour http requests. You can declare this at the global/app level or use at the controller level:\n\n```typescript\n\nimport { Controller, UseInterceptors } from '@nestjs/common';\nimport { ElasticsearchRequestInterceptor } from '@nestjs.pro/logger-elasticsearch/dist/ElasticsearchRequestInterceptor';\n\n@UseInterceptors(ElasticsearchRequestInterceptor)\n@Controller('/mycontroller')\nexport class MyController {\n\n    // ...\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxcharm093%2Fmodule-logger-elasticsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxcharm093%2Fmodule-logger-elasticsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxcharm093%2Fmodule-logger-elasticsearch/lists"}