npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@wizardsoftheweb/logs-with-winston

v0.3.5

Published

An simple decorator to add winston to existing files

Downloads

1

Readme

@wizardsoftheweb/logs-with-winston

Build Status Coverage Status

This started out as an opinionated winston setup, but I quickly realized I just wanted a winston decorator because trying to come up with unified logging is hard.

This decorator adds a public member, logger, which you can prepopulate with your own instance of a winston logger or feed it options to do it for you.

I'm going to use this for a few weeks before tagging v1 because I want to make sure it's actually as simple as it should be.

You might also be interested in @wizardsoftheweb/cli-logs-with-winston. It provides a QOL .bin script that can automatically decorate existing files and generate pre-decorated skeletons.

Installation

npm install @wizardsoftheweb/logs-with-winston

In a dev environment, you might also consider installing the generator package:

npm install --save-dev @wizardsoftheweb/cli-logs-with-winston

Tests

In the interest of keeping the final package as small as possible, none of the tests are installed. Instead, you'll need to clone the repo.

git clone https://github.com/wizardsoftheweb/logs-with-winston.git
cd logs-with-winston
npm install
npm t

Usage

API

LogsWithWinston(input?: LoggerInstance | LoggerOptions)

input is an existing LoggerInstance, a LoggerOptions object that can be passed to winston to create a new LoggerInstance, or an object that won't do anything.

I've also exported an interface, ILogsWithWinston, that you can use for implements to appease code editors.

Examples

I keep more in-depth usage examples on GitHub.

Scope?

Polluting the global namespace is generally considered a bad idea, so why would you do it on NPM?

Roadmap

These percentages are pretty arbitrary. Today's 47% could be tomorrow's 90% or vice versa.

Main Features

Once all of these are finished, I'll release v1. Until then, v0 should be used with caution, because it's not stable.

| Progess | Feature | | ------: | ------- | | 100% | Add decorator | | 100% | Test | | 100% | Export the full namespace | | 100% | Compile declaration file | | 70% | ~~Compile docs from source~~ Write docs | | 0% | Publish package on npm |

Eventual features

These are things I'd like to add, but probably won't be included in v1. If not, they'll most likely constitute one or more minor version increments.

| Progess | Feature | | ------: | ------- | | 0% | Greenkeeper (or similar) integration | | 50% | Move examples to subdirectory | | 50% | Add build step for examples/README | | 0% | ~~Provide a container for testing/examples~~ | | 0% | Add bin script to attach implements filler |