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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dismissible/nestjs-logger

v3.1.1

Published

Console logger module for Dismissible applications

Readme

Dismissible manages the state of your UI elements across sessions, so your users see what matters, once! No more onboarding messages reappearing on every tab, no more notifications haunting users across devices. Dismissible syncs dismissal state everywhere, so every message is intentional, never repetitive.

@dismissible/nestjs-logger

A flexible logging module for NestJS applications in the Dismissible ecosystem.

Part of the Dismissible API - This library is part of the Dismissible API ecosystem. Visit dismissible.io for more information and documentation.

Overview

This library provides a standardized logging interface (IDismissibleLogger) and a default console logger implementation. It's designed to be easily replaceable with custom logging implementations (e.g., Winston, Pino, etc.) while maintaining a consistent API across the Dismissible ecosystem.

Installation

npm install @dismissible/nestjs-logger

Getting Started

Basic Usage

The simplest way to use the logger is with the default console logger:

import { Module } from '@nestjs/common';
import { LoggerModule } from '@dismissible/nestjs-logger';

@Module({
  imports: [
    LoggerModule.forRoot({
      // Uses default ConsoleLogger if not specified
    }),
  ],
})
export class AppModule {}

Using the Logger in Your Services

import { Injectable, Inject } from '@nestjs/common';
import { DISMISSIBLE_LOGGER, IDismissibleLogger } from '@dismissible/nestjs-logger';

@Injectable()
export class MyService {
  constructor(@Inject(DISMISSIBLE_LOGGER) private readonly logger: IDismissibleLogger) {}

  doSomething() {
    this.logger.debug('Debug message', { context: 'MyService' });
    this.logger.log('Log message', { userId: 'user-123' });
    this.logger.warn('Warning message', { itemId: 'item-456' });
    this.logger.error('Error message', new Error('Something went wrong'), {
      additionalContext: 'value',
    });
  }
}

Custom Logger Implementation

You can provide your own logger implementation:

import { Module } from '@nestjs/common';
import { LoggerModule, IDismissibleLogger } from '@dismissible/nestjs-logger';
import * as winston from 'winston';

class WinstonLogger implements IDismissibleLogger {
  private logger = winston.createLogger({
    // Your Winston configuration
  });

  debug(message: string, context?: object): void {
    this.logger.debug(message, context);
  }

  log(message: string, ...optionalParams: any[]): void {
    this.logger.log(message, ...optionalParams);
  }

  warn(message: string, context?: object): void {
    this.logger.warn(message, context);
  }

  error(message: string, error?: Error, context?: object): void {
    this.logger.error(message, { error, ...context });
  }
}

@Module({
  imports: [
    LoggerModule.forRoot({
      logger: WinstonLogger,
    }),
  ],
})
export class AppModule {}

API Reference

IDismissibleLogger Interface

interface IDismissibleLogger {
  debug(message: string, ...optionalParams: any[]): void;
  log(message: string, ...optionalParams: any[]): void;
  warn(message: string, ...optionalParams: any[]): void;
  error(message: string, ...optionalParams: any[]): void;
}

LoggerModule

LoggerModule.forRoot(options)

Configures the logger module with the provided options.

Options:

  • logger?: Type<IDismissibleLogger> - Custom logger class (defaults to Logger)

Returns: DynamicModule

Global Module

The LoggerModule is registered as a global module, so you only need to import it once in your root module. The logger will be available throughout your application via dependency injection.

Related Packages

This logger is used by other Dismissible packages:

  • @dismissible/nestjs-core - Main dismissible service
  • @dismissible/nestjs-storage - Storage adapters
  • @dismissible/nestjs-postgres-storage - PostgreSQL storage adapter

License

MIT