{"id":18441605,"url":"https://github.com/stefanwalther/winster","last_synced_at":"2025-04-15T04:57:03.389Z","repository":{"id":52543448,"uuid":"75103638","full_name":"stefanwalther/winster","owner":"stefanwalther","description":"Opinionated \u0026 ready to use logging module for node.js based on Winston.","archived":false,"fork":false,"pushed_at":"2025-03-03T11:51:44.000Z","size":210,"stargazers_count":0,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T17:54:33.292Z","etag":null,"topics":["logger","logging","logging-library","winston"],"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/stefanwalther.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.yml","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2016-11-29T17:07:52.000Z","updated_at":"2019-12-03T22:58:09.000Z","dependencies_parsed_at":"2024-01-05T14:44:02.675Z","dependency_job_id":"bc270191-7225-4ea1-bbba-cf640ee4cea4","html_url":"https://github.com/stefanwalther/winster","commit_stats":{"total_commits":135,"total_committers":7,"mean_commits":"19.285714285714285","dds":0.5555555555555556,"last_synced_commit":"d516a545777f77475f32b261e6502eb102e29827"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fwinster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fwinster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fwinster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fwinster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanwalther","download_url":"https://codeload.github.com/stefanwalther/winster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248442500,"owners_count":21104197,"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":["logger","logging","logging-library","winston"],"created_at":"2024-11-06T06:38:45.802Z","updated_at":"2025-04-15T04:57:03.372Z","avatar_url":"https://github.com/stefanwalther.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# winster\n\u003e Optionated logging library based on Winston.\n\n[![NPM version](https://img.shields.io/npm/v/winster.svg?style=flat)](https://www.npmjs.com/package/winster)\n[![David](https://img.shields.io/david/stefanwalther/winster.svg)](https://github.com/stefanwalther/winster)\n[![CircleCI](https://img.shields.io/circleci/project/github/stefanwalther/winster.svg)](https://circleci.com/gh/stefanwalther/winster/tree/master)\n[![codecov](https://codecov.io/gh/stefanwalther/winster/branch/master/graph/badge.svg)](https://codecov.io/gh/stefanwalther/winster)\n[![XO code style](https://img.shields.io/badge/code_style-XO--space-5ed9c7.svg)](https://github.com/sindresorhus/eslint-config-xo-space)\n\n## Motivation\nWinston is a powerful logging framework but still needs some setup for every project.  \n_Winster_ makes it easier to use logging with zero configuration in typical node.js projects.  \n\n## Install\n```sh\n$ npm install winster --save\n```\n\nNote: _winster_ requires node.js 6.0 and higher.\n\n## Usage\n**Basic usage, zero configuration:**\n\n```js\nimport winster as logger from 'winster';\nconst logger = require('winster').instance();\n\nlogger.trace('Some trace information ...');\nlogger.info('Some, whatever info ...');\n\n```\n\n### Log levels\n\n_Winster_ uses slightly different logging levels compared to winston:\n\n```js\nlogger.fatal('...');\nlogger.error('...');\nlogger.debug('...');\nlogger.warn('...');\nlogger.data('...');\nlogger.info('...');\nlogger.verbose('...');\nlogger.trace('...');\n```\n\n### Transporters\n\nBy default the pre-configured transports in `./src/default.transports.js` will be used.\n\nYou can configure your custom transport configuration, by:\n\n**Prio 1**: Adding a section `winster` to your `package.json`, pointing to your configuration file:\n\n```js\n\"winster\": {\n  \"configFile\": \"./config/winster.js\"\n}\n```\n\n**Prio 2**: Placing a file called `.winster.json` or `.winster.js` to the root of your project.\n\nTransporters can be defined by environment (`process.env.NODE_ENV`):\n\n```js\n\nconst Winston = require('winston');\n\nmodule.exports = {\n  development: [\n    {\n      transporter: Winston.transports.Console,\n      options: {\n        name: 'Console',\n        level: 'trace',\n        colorize: true,\n        json: false,\n        prettyPrint(object) {\n          return JSON.stringify(object, null, 2);\n        },\n        handleExceptions: true\n      }\n    }\n  ],\n  production: [\n    {\n      transporter: Winston.transports.File,\n      options: {\n        name: 'File',\n        filename: 'foo.log'\n      }\n    }\n  ],\n  test: [\n    // your transports for test\n  ]\n};\n```\n\nIf no matching environment-section can be found in your configuration file, no transports will be added.\n\n## Author\n**Stefan Walther**\n\n* [github/stefanwalther](https://github.com/stefanwalther)\n* [twitter/waltherstefan](http://twitter.com/waltherstefan)\n\n## License\nMIT\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 17, 2018._\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanwalther%2Fwinster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanwalther%2Fwinster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanwalther%2Fwinster/lists"}