{"id":18470367,"url":"https://github.com/aliencreations/alien-node-winston-utils","last_synced_at":"2026-01-28T15:31:37.403Z","repository":{"id":35275127,"uuid":"39535920","full_name":"AlienCreations/alien-node-winston-utils","owner":"AlienCreations","description":"Helper functions for Winston on NodeJS","archived":false,"fork":false,"pushed_at":"2023-09-13T21:23:17.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T18:17:26.470Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/AlienCreations.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-22T23:53:35.000Z","updated_at":"2023-09-13T15:11:01.000Z","dependencies_parsed_at":"2024-11-06T10:13:47.898Z","dependency_job_id":"4cd35080-60f3-4a82-ac02-053b2c65972d","html_url":"https://github.com/AlienCreations/alien-node-winston-utils","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"4755868385b7202a479804061699672f79b404a0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlienCreations%2Falien-node-winston-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlienCreations%2Falien-node-winston-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlienCreations%2Falien-node-winston-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlienCreations%2Falien-node-winston-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlienCreations","download_url":"https://codeload.github.com/AlienCreations/alien-node-winston-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243039610,"owners_count":20226131,"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":[],"created_at":"2024-11-06T10:13:44.240Z","updated_at":"2026-01-28T15:31:37.365Z","avatar_url":"https://github.com/AlienCreations.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# alien-node-winston-utils\nHelper functions for Winston logging on NodeJS. The functions are pure and curried with Ramda.\n\n[![Build Status](https://travis-ci.org/AlienCreations/alien-node-winston-utils.svg?branch=master)](https://travis-ci.org/AlienCreations/alien-node-winston-utils) [![Coverage Status](https://coveralls.io/repos/AlienCreations/alien-node-winston-utils/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/AlienCreations/alien-node-winston-utils?branch=master) [![npm version](http://img.shields.io/npm/v/alien-node-winston-utils.svg)](https://npmjs.org/package/alien-node-winston-utils) [![Dependency Status](https://david-dm.org/AlienCreations/alien-node-winston-utils.svg)](https://david-dm.org/AlienCreations/alien-node-winston-utils)\n\n## Install\n\n```\n$ npm install alien-node-winston-utils --save\n```\n\nRun the specs\n\n```\n$ npm test\n```\n\n## Usage\n\n```js\n\n// Example config file in Node\nvar loggerUtils = require('alien-node-winston-utils');\n\n// ...\n\n  logging : {\n    winston : {\n      transports : [\n        {\n          name          : 'console',\n          level         : 'debug',\n          timestamp     : loggerUtils.getDateString,\n          colorize      : true,\n          transportType : 'console'\n        },\n        {\n          name             : 'file',\n          level            : 'error',\n          timestamp        : loggerUtils.getDateString,\n          colorize         : true,\n          transportType    : 'file',\n          filename         : 'logs/activity.log',\n          json             : false, // required for formatter to work\n          formatter        : loggerUtils.getFormatter,\n          handleExceptions : true,\n          datePattern      : '.yyyy-MM-dd' // dictates how logs are rotated - more specific pattern rotates more often\n        }\n      ],\n      strategies : {\n        console : winston.transports.Console,\n        file    : winston.transports.DailyRotateFile\n      }\n    }\n  },\n  \n// ...\n\n```\n\n## Methods\n\n#### getDateString\nThis is just a helper for Winston's `timestamp` option, which just returns `new Date().toString()`\n\n#### getFormatter\nThis is the primary use of this library. As seen in the usage above, use it as a pointer reference. As seen in \nthe TODO below, we will want to make this a true getter which accepts a template param. But for now, \nit works just fine. \n\n## TODO\n - Currently there is only one formatter. Allowing it to accept a decorator would be considerate. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliencreations%2Falien-node-winston-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliencreations%2Falien-node-winston-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliencreations%2Falien-node-winston-utils/lists"}