{"id":13508702,"url":"https://github.com/webpack-contrib/webpack-log","last_synced_at":"2025-03-30T11:32:41.641Z","repository":{"id":66001276,"uuid":"114565795","full_name":"webpack-contrib/webpack-log","owner":"webpack-contrib","description":"[DEPRECATED] Please use logger API https://github.com/webpack/webpack/pull/9436","archived":true,"fork":false,"pushed_at":"2019-09-05T13:39:58.000Z","size":645,"stargazers_count":38,"open_issues_count":6,"forks_count":14,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-17T11:48:33.392Z","etag":null,"topics":["log","logger","logging","webpack"],"latest_commit_sha":null,"homepage":"","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/webpack-contrib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-12-17T20:19:32.000Z","updated_at":"2023-01-28T17:20:12.000Z","dependencies_parsed_at":"2024-01-13T20:36:50.175Z","dependency_job_id":"60950f36-b424-4b55-9e2b-f8b0d3775000","html_url":"https://github.com/webpack-contrib/webpack-log","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack-contrib%2Fwebpack-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack-contrib%2Fwebpack-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack-contrib%2Fwebpack-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack-contrib%2Fwebpack-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webpack-contrib","download_url":"https://codeload.github.com/webpack-contrib/webpack-log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314013,"owners_count":20757451,"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":["log","logger","logging","webpack"],"created_at":"2024-08-01T02:00:57.208Z","updated_at":"2025-03-30T11:32:41.141Z","avatar_url":"https://github.com/webpack-contrib.png","language":"JavaScript","readme":"[DEPRECATED] Plese use logger api https://github.com/webpack/webpack/pull/9436\n\n[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![deps][deps]][deps-url]\n[![test][test]][test-url]\n[![coverage][cover]][cover-url]\n[![chat][chat]][chat-url]\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"160\" height=\"160\" src=\"docs/logo.svg\"\u003e\n  \u003ca href=\"https://github.com/webpack/webpack\"\u003e\n    \u003cimg width=\"180\" height=\"180\" src=\"https://webpack.js.org/assets/icon-square-big.svg\"\u003e\n  \u003c/a\u003e\n  \u003ch1\u003ewebpack Log\u003c/h1\u003e\n  \u003cp\u003eA common logging module for the webpack ecosystem\u003c/p\u003e\n\u003c/div\u003e\n\n## Install\n\n```bash\nnpm i -D webpack-log\n```\n\n\u003e ⚠️ We do not recommend installing this module globally\n\n## Usage\n\n```js\nconst log = require('webpack-log');\nconst logger = log({ name: 'wds' });\n\nlogger.info('Server Starting');\n```\n\n![output](docs/output.png)\n\n\u003e ℹ️ The logger returned is unique by default, due to the nature of the `webpack` ecosystem. Please reference the [`unique`](#unique) option below for disabling this feature and to **force caching**\n\n## Options\n\n|             Name              |    Type     |    Default     | Description             |\n| :---------------------------: | :---------: | :------------: | :---------------------- |\n|      [**`name`**](#name)      | `{String}`  | `''\u003cunknown\u003e'` | Log Name (**Required**) |\n|     [**`level`**](#level)     | `{String}`  |    `'info'`    | Log Level               |\n|    [**`unique`**](#unique)    | `{Boolean}` |     `true`     | Log Uniqueness          |\n| [**`timestamp`**](#timestamp) | `{Boolean}` |    `false`     | Log Timestamps          |\n\n### `name`\n\nSpecifies the name of the log to create. **This option is required**, and used to differentiate between loggers when `webpack-log` is used in multiple projects\nexecuting in the same process\n\n```js\nconst logger = log({ name: 'wds' });\n```\n\n### `level`\n\nSpecifies the level the logger should use. A logger will not produce output for\nany log level _beneath_ the specified level. Available levels and order are:\n\n```js\n['info', 'warn', 'error', 'trace', 'debug', 'silent'];\n```\n\n```js\nconst logger = log({ level: 'error' });\n\nlogger.error(err);\n```\n\n\u003e ℹ️ The level names shown above correspond to the available logging methods,\n\u003e with the notable exception of the `silent` level\n\n### `unique`\n\nIf `false`, instructs the logger to used cached versions of a log with the same name. Due to the nature of the `webpack` ecosystem and multiple plugin/loader usage in the same process, loggers are created as unique instances by default. By passing `false` for this property, the module is instructed to cache the requested logger\n\n```js\nconst logger = log({ unique: true });\n```\n\n### `timestamp`\n\nIf `true`, instructs the logger to display a timestamp for log output, preceding\nall other data\n\n```js\nconst logger = log({ timestamp: true });\n```\n\n[npm]: https://img.shields.io/npm/v/webpack-log.svg\n[npm-url]: https://npmjs.com/package/webpack-log\n[node]: https://img.shields.io/node/v/webpack-log.svg\n[node-url]: https://nodejs.org\n[deps]: https://david-dm.org/webpack-contrib/webpack-log.svg\n[deps-url]: https://david-dm.org/webpack-contrib/webpack-log\n[test]: http://img.shields.io/travis/webpack-contrib/webpack-log.svg\n[test-url]: https://travis-ci.org/webpack-contrib/webpack-log\n[cover]: https://codecov.io/gh/webpack-contrib/webpack-log/branch/master/graph/badge.svg\n[cover-url]: https://codecov.io/gh/webpack-contrib/webpack-log\n[chat]: https://badges.gitter.im/webpack/webpack.svg\n[chat-url]: https://gitter.im/webpack/webpack\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpack-contrib%2Fwebpack-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebpack-contrib%2Fwebpack-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpack-contrib%2Fwebpack-log/lists"}