{"id":15825360,"url":"https://github.com/dsc8x/winston-dev-console","last_synced_at":"2025-05-12T19:57:08.533Z","repository":{"id":43004309,"uuid":"354598260","full_name":"dsc8x/winston-dev-console","owner":"dsc8x","description":"Winston@3 console format aimed to improve development UX","archived":false,"fork":false,"pushed_at":"2022-03-23T22:10:13.000Z","size":1361,"stargazers_count":96,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-10T10:44:32.893Z","etag":null,"topics":["console","debug","development","format","formatter","inspect","logger","logging","node","node-js","nodejs","pretty","winston","winston-logger"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/dsc8x.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":"2021-04-04T16:55:53.000Z","updated_at":"2025-03-14T03:03:09.000Z","dependencies_parsed_at":"2022-09-23T13:54:02.841Z","dependency_job_id":null,"html_url":"https://github.com/dsc8x/winston-dev-console","commit_stats":null,"previous_names":["dsc8x/winston-dev-console","epegzz/winston-dev-console"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsc8x%2Fwinston-dev-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsc8x%2Fwinston-dev-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsc8x%2Fwinston-dev-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsc8x%2Fwinston-dev-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsc8x","download_url":"https://codeload.github.com/dsc8x/winston-dev-console/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253813783,"owners_count":21968553,"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":["console","debug","development","format","formatter","inspect","logger","logging","node","node-js","nodejs","pretty","winston","winston-logger"],"created_at":"2024-10-05T09:08:55.660Z","updated_at":"2025-05-12T19:57:08.495Z","avatar_url":"https://github.com/dsc8x.png","language":"TypeScript","readme":"# winston-dev-console\n\nA Winston@3 console format for development (based on [winston-console-format](https://github.com/duccio/winston-console-format)) that aims to improve NodeJS development UX by\n* adding the source of the logging statement to the log output\n* optimizing readability of each log statement through log statement separation, output colorization and arg pretty printing\n   \n\n## Demo\n\n![](demo.png)\n\n### Real world screenshot:\n\n![](demo2.png)\n\n## Install\n\n```bash\nnpm install winston @epegzz/winston-dev-console\n```\n\nor\n\n```bash\nyarn add winston @epegzz/winston-dev-console\n```\n\u003cbr\u003e\n\n## Usage TypeScript\n\n```typescript\nimport { createLogger, format, transports } from \"winston\";\nimport winstonDevConsole from \"@epegzz/winston-dev-console\";\nimport util from \"util\";\n\nlet log = createLogger({\n  level: \"silly\", // or use process.env.LOG_LEVEL\n});\n\n// Note: You probably only want to use winstonDevConsole during development\nlog = winstonDevConsole.init(log);\nlog.add(\n  winstonDevConsole.transport({\n    showTimestamps: false,\n    addLineSeparation: true,\n  })\n);\n\nlog.silly(\"Logging initialized\");\nlog.debug(\"Debug an object\", { make: \"Ford\", model: \"Mustang\", year: 1969 });\nlog.verbose(\"Returned value\", { value: util.format });\nlog.info(\"Information\", {\n  options: [\"Lorem ipsum\", \"dolor sit amet\"],\n  values: [\"Donec augue eros, ultrices.\"],\n});\nlog.warn(\"Warning\");\nlog.error(new Error(\"Unexpected error\"));\n```\n\n## Usage JavaScript\n\n```js\nconst { createLogger, format, transports } = require(\"winston\");\nconst winstonDevConsole = require(\"@epegzz/winston-dev-console\").default;\nconst util = require(\"util\");\n\nlet log = createLogger({\n  level: \"silly\", // or use process.env.LOG_LEVEL\n});\n\n// Note: You probably only want to use winstonDevConsole during development\nlog = winstonDevConsole.init(log);\nlog.add(\n  winstonDevConsole.transport({\n    showTimestamps: false,\n    addLineSeparation: true,\n  })\n);\n\nlog.silly(\"Logging initialized\");\nlog.debug(\"Debug an object\", { make: \"Ford\", model: \"Mustang\", year: 1969 });\nlog.verbose(\"Returned value\", { value: util.format });\nlog.info(\"Information\", {\n  options: [\"Lorem ipsum\", \"dolor sit amet\"],\n  values: [\"Donec augue eros, ultrices.\"],\n});\nlog.warn(\"Warning\");\nlog.error(new Error(\"Unexpected error\"));\n```\n\n## API\n\n## winstonDevConsole.format(options)\n\n### options\n\nConfiguration object.\u003cbr\u003e\u003cbr\u003eType: `DevConsoleFormatOptions`\n\n### options.inspectOptions\n\n`util.inspect()` [configuration object](https://nodejs.org/api/util.html#util_util_inspect_object_options).\u003cbr\u003e\u003cbr\u003e Type: `Object`\u003cbr\u003e \n\n### options.basePath\n\nUsed to remove the base path of the project when showing the file path of the log statement.\nBy default anything in the path before (and including) the `src` folder will be removed.\n\u003cbr\u003e\u003cbr\u003e\nType: `String`\u003cbr\u003e\n\n### options.addLineSeparation\n\nWheather or not to separate each log statement with a blank line.\n\u003cbr\u003e\u003cbr\u003e\nType: `Boolean`\u003cbr\u003e\nDefault: `true`\u003cbr\u003e\n\n### options.showTimestamps\n\nWheather or not to show timestamps\u003cbr\u003e\nDuring development the timestamps are usually more noise then helpful, therefore disabled by default.\n\u003cbr\u003e\u003cbr\u003e\nType: `Boolean`\u003cbr\u003e\nDefault: `false`\u003cbr\u003e\n\n\n## Acknowledgements\n\nThis project is inspired by and partly shamelessly copied from [winston-console-format](https://github.com/duccio/winston-console-format)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsc8x%2Fwinston-dev-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsc8x%2Fwinston-dev-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsc8x%2Fwinston-dev-console/lists"}