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

quto-logger

v1.0.0

Published

Lightweight error and event logging SDK for Quto.dev — a simple Sentry alternative

Readme

quto-logger

Lightweight error and event logging SDK for Quto.dev — a simple Sentry alternative.

Install

npm install quto-logger

Quick Start

import QutoLogger from 'quto-logger';

const logger = new QutoLogger({
  apiKey: 'your-api-key-here',
  environment: 'production', // optional: 'production' | 'staging' | 'development'
});

// Log an error
await logger.error('Payment processing failed', { userId: '123', orderId: 'abc' });

// Log a warning
await logger.warning('API response slow', { endpoint: '/api/users', latency: 2500 });

// Log info
await logger.info('User signed up', { plan: 'pro' });

// Capture exceptions with stack traces
try {
  await riskyOperation();
} catch (err) {
  await logger.captureException(err, { context: 'checkout-flow' });
}

Getting Your API Key

  1. Go to quto.dev/tools/error-logging
  2. Create an account and log in
  3. Click "New Application" and give it a name
  4. Copy the API key from the applications table

API

new QutoLogger(options)

| Option | Type | Required | Default | Description | |--------|------|----------|---------|-------------| | apiKey | string | Yes | — | Your Quto application API key | | environment | string | No | 'production' | Environment name | | baseUrl | string | No | 'https://api.quto.dev' | API base URL | | debug | boolean | No | false | Log send failures to console |

Methods

| Method | Description | |--------|-------------| | logger.error(message, metadata?) | Log an error | | logger.warning(message, metadata?) | Log a warning | | logger.info(message, metadata?) | Log an info event | | logger.captureException(error, metadata?) | Capture an Error object with stack trace |

All methods return Promise<{ success: boolean, log_id: number } | null>. Returns null on failure (never throws).

Metadata

Pass any object as metadata to attach context to your logs:

await logger.error('Database connection failed', {
  host: 'db.example.com',
  retryCount: 3,
  lastError: 'ECONNREFUSED',
});

REST API (without SDK)

You can also send logs directly via HTTP:

curl -X POST https://api.quto.dev/api/logs \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key-here" \
  -d '{
    "level": "error",
    "message": "Something went wrong",
    "stack": "Error: Something went wrong\n    at main (app.js:10)",
    "environment": "production",
    "metadata": { "userId": "123" }
  }'

Request Body

| Field | Type | Required | Description | |-------|------|----------|-------------| | level | string | Yes | 'error', 'warning', or 'info' | | message | string | Yes | Log message (max 5000 chars) | | stack | string | No | Stack trace (max 10000 chars) | | environment | string | No | 'production', 'staging', or 'development' | | metadata | object | No | Any additional context |

Frameworks

Express.js

import QutoLogger from 'quto-logger';

const logger = new QutoLogger({ apiKey: process.env.QUTO_API_KEY });

app.use((err, req, res, next) => {
  logger.captureException(err, {
    method: req.method,
    url: req.originalUrl,
    ip: req.ip,
  });
  res.status(500).json({ error: 'Internal server error' });
});

React

import QutoLogger from 'quto-logger';

const logger = new QutoLogger({
  apiKey: 'your-api-key',
  environment: process.env.NODE_ENV,
});

// Global error handler
window.addEventListener('error', (event) => {
  logger.captureException(event.error, { url: window.location.href });
});

window.addEventListener('unhandledrejection', (event) => {
  logger.error('Unhandled promise rejection', {
    reason: String(event.reason),
    url: window.location.href,
  });
});

Node.js

import QutoLogger from 'quto-logger';

const logger = new QutoLogger({ apiKey: process.env.QUTO_API_KEY });

process.on('uncaughtException', (err) => {
  logger.captureException(err).then(() => process.exit(1));
});

process.on('unhandledRejection', (reason) => {
  logger.error('Unhandled rejection', { reason: String(reason) });
});

License

MIT