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

@teliagen/logger

v0.4.2

Published

Logging utility for Teliagen Framework

Readme

@teliagen/logger

Logging utility for the Teliagen Framework.

npm version TypeScript License: Apache-2.0

Overview

@teliagen/logger provides a lightweight, colorful logging utility with:

  • Log Levels – Debug, Info, Warn, Error
  • Colorized Output – Easy-to-read console output
  • Context Tags – Module/component prefixes
  • Symbols – Visual indicators for status
  • Environment-Aware – Auto-adjusts based on NODE_ENV

Installation

npm install @teliagen/logger
# or
pnpm add @teliagen/logger

Quick Start

import { Logger } from '@teliagen/logger';

Logger.info('Server', 'Server started on port 3000');
Logger.debug('Database', 'Connected to PostgreSQL');
Logger.warn('Auth', 'Token expires in 5 minutes');
Logger.error('Payment', 'Payment processing failed', new Error('Timeout'));

API

Log Methods

// Info - General information
Logger.info(context: string, message: string, ...args: any[]);

// Debug - Development/debugging information
Logger.debug(context: string, message: string, ...args: any[]);

// Warn - Warning messages
Logger.warn(context: string, message: string, ...args: any[]);

// Error - Error messages
Logger.error(context: string, message: string, error?: Error);

Examples

import { Logger } from '@teliagen/logger';

// Basic usage
Logger.info('App', 'Application started');
// [App] Application started

Logger.debug('DB', 'Query executed', { table: 'users', rows: 42 });
// [DB] Query executed { table: 'users', rows: 42 }

Logger.warn('Cache', 'Cache miss for key: user-123');
// [Cache] ⚠ Cache miss for key: user-123

Logger.error('API', 'Request failed', new Error('Network error'));
// [API] ✖ Request failed
// Error: Network error
//     at ...

Symbols

Logger.symbols = {
  SUCCESS: '✔',
  ERROR: '✖',
  WARNING: '⚠',
  INFO: 'ℹ',
  ARROW: '→',
  BULLET: '•'
};

// Use in messages
Logger.info('Plugin', `${Logger.symbols.SUCCESS} Plugin installed successfully`);
Logger.error('Auth', `${Logger.symbols.ERROR} Authentication failed`);

Log Level Control

// Set minimum log level
Logger.setLevel('info');  // Options: 'debug', 'info', 'warn', 'error', 'silent'

// Debug logs will be hidden
Logger.debug('Test', 'This will not show');
Logger.info('Test', 'This will show');

// Disable all logging
Logger.setLevel('silent');

Environment Detection

// Automatically adjusts based on NODE_ENV
// - development: debug level, full colors
// - production: info level, simplified output
// - test: warn level, minimal output

// Override with environment variable
// LOG_LEVEL=debug node app.js

Usage in Teliagen

The Logger is used throughout the Teliagen framework:

import { Logger } from '@teliagen/logger';

// In plugins
class MyPlugin {
  install(app) {
    Logger.info('MyPlugin', 'Installing plugin...');
    // ...
    Logger.info('MyPlugin', `${Logger.symbols.SUCCESS} Plugin installed`);
  }
}

// In actions
class UserActions {
  async createUser(input) {
    Logger.debug('UserActions', 'Creating user', { email: input.email });
    const user = await User.create(input);
    Logger.info('UserActions', `User created: ${user.id}`);
    return user;
  }
}

// In middleware/hooks
app.registerGlobalHook('before', async (ctx) => {
  Logger.debug('Hook', `${Logger.symbols.ARROW} ${ctx.actionName}`);
});

Output Format

[Context] Message
[Context] ✔ Success message
[Context] ⚠ Warning message
[Context] ✖ Error message

With colors:

  • Context: Cyan
  • Info: Default
  • Debug: Gray
  • Warn: Yellow
  • Error: Red

Requirements

  • Node.js >= 18.0.0

Documentation

For full documentation, visit docs.teliagen.org.

License

Apache-2.0