{"id":23703591,"url":"https://github.com/mrshoenel/js-log-client","last_synced_at":"2026-05-15T13:34:13.519Z","repository":{"id":30107958,"uuid":"123939701","full_name":"MrShoenel/js-log-client","owner":"MrShoenel","description":"A generic node.js client to log messages cross-platform. Since v2.0.0, it is supposed to be functionally equal to the logging in util-dotnet.","archived":false,"fork":false,"pushed_at":"2022-12-07T17:50:12.000Z","size":170,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-24T13:45:11.773Z","etag":null,"topics":["logging","nodejs","remote"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/MrShoenel.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":"2018-03-05T15:30:16.000Z","updated_at":"2020-02-17T09:40:39.000Z","dependencies_parsed_at":"2023-01-14T16:19:35.065Z","dependency_job_id":null,"html_url":"https://github.com/MrShoenel/js-log-client","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrShoenel%2Fjs-log-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrShoenel%2Fjs-log-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrShoenel%2Fjs-log-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrShoenel%2Fjs-log-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrShoenel","download_url":"https://codeload.github.com/MrShoenel/js-log-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239780139,"owners_count":19695736,"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","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":["logging","nodejs","remote"],"created_at":"2024-12-30T13:06:51.590Z","updated_at":"2026-05-15T13:34:13.488Z","avatar_url":"https://github.com/MrShoenel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LogClient\nLogClient (or: `log-client`) is a universal module for nodejs or JavaScript applications in general for distributed logging using various transport methods. The concept of this logger is based on `Microsoft.Extensions.Logging`.\n\n## Install via npm \u003cspan style=\"vertical-align:middle\"\u003e[![Current Version](https://img.shields.io/npm/v/sh.log-client.svg)](https://www.npmjs.com/package/sh.log-client)\u003c/span\u003e\n`npm install sh.log-client`\n\n## Included Loggers\nCurrently, this client includes the following loggers:\n* __`BaseLogger\u003cT\u003e`__ the abstract base-class for all loggers that includes neccessary functionality, only having its `log()`-method abstract.\n  * __`BaseScope\u003cT\u003e`__ the base-class for scopes\n* __`ColoredConsoleLogger\u003cT\u003e`__ a logger that outputs to the console's streams (info, warning, error) and is configurable w.r.t. to which level should be logged to which stream. Also supports colors.\n* __`DevNullLogger\u003cT\u003e`__ a dummy logger that discards all messages and is always enabled\n* __`InMemoryLogger\u003cT\u003e`__ and __`InMemoryLogMessage\u003cT\u003e`__ a logger and its message to store log messages in memory. Supports specifying a maximum capacity so that only the newest messages are kept.\n* __`DualLogger\u003cT, TLog1, TLog2\u003e`__ a logger that forwards all logging-calls to two other loggers without modifying them.\n* __`WrappedLogger\u003cTLog1, TLog2\u003e`__ a logger that wraps and mimics an original logger (`TLog1`) and also forwards any logging calls to a 2nd copy-logger (`TLog2`). This is an extension to the *DualLogger*.\n* __`StreamLogger\u003cT\u003e`__ a logger that writes messages to a `Writable`-stream. Supports different streams per log level.\n\n## Included Extras\nCurrently, these extras are included:\n* __`LoggerPipe`__ is a `Writable` stream that encapsulates any of the above loggers and writes (pipes) all chunks to its log-method. This class is useful when a stream shall be piped to a logger (e.g. when having a logger for each of a process' streams).\n\n## Write and contribute your own Loggers\nWriting an own logger is as simple as extending `BaseLogger\u003cT\u003e`. Please, submit a _pull-request_ if you want to contribute your own logger to this repository.\n\n\n## Breaking changes since version 2.0.0\nThe `log-client` is supposed to be a functionally equivalent implementation of the logging functionalities found in `util-dotnet` (https://github.com/MrShoenel/util-dotnet).\nThe concept of `Transporter`s has been removed entirely.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrshoenel%2Fjs-log-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrshoenel%2Fjs-log-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrshoenel%2Fjs-log-client/lists"}