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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@serkankuyu/catchlogs

v2.1.6

Published

Error logs daily for developers

Readme

Catchlogs

Catchlogs is a powerful error tracking platform designed for developers. It helps you instantly detect and respond to errors in your applications.

Visit Catchlogs

Why Catchlogs?

While identifying errors in local development is usually straightforward, once your project goes live, errors can go unnoticed without user feedback. This leads to poor user experience and potential reputation damage. Catchlogs solves this by capturing and analyzing errors in real-time.

Features

  • Automatic Error Capture: Automatically catches uncaught exceptions
  • Promise Error Handling: Automatically catches unhandled promise rejections
  • Try-Catch Integration: Easily send errors from try-catch blocks
  • Channel Support: Organize logs by different channels (e.g., production, staging, development)
  • Quick Setup: Easy integration with npm
  • Framework Agnostic: Works with all JavaScript projects

Getting Started

  1. Sign in with Google Sign in to Catchlogs with your Google account to obtain your API key.

  2. Install Catchlogs

npm i @serkankuyu/catchlogs
  1. Integrate Catchlogs

Basic Usage

import catchlogs from '@serkankuyu/catchlogs';

// Initialize the SDK with a specific channel
const logger = new catchlogs('API_KEY', 'production'); // channel is optional, defaults to 'default'
logger.init();

// All uncaught errors will now be automatically logged to the specified channel

Multiple Channels Example

// Different loggers for different environments or purposes
const productionLogger = new catchlogs('API_KEY', 'production');
const stagingLogger = new catchlogs('API_KEY', 'staging');
const developmentLogger = new catchlogs('API_KEY', 'development');

// Initialize the appropriate logger based on your environment
const logger = process.env.NODE_ENV === 'production' ? productionLogger : developmentLogger;
logger.init();

Vue.js Integration

// main.js
import { createApp } from 'vue'
import catchlogs from '@serkankuyu/catchlogs'
import App from './App.vue'

const logger = new catchlogs('API_KEY', 'vue-errors');
logger.init();

const app = createApp(App)

app.config.errorHandler = (error) => {
    catchlogs.catch(error);
}

app.mount('#app')

React Integration

// index.js or App.js
import React from 'react';
import catchlogs from '@serkankuyu/catchlogs';

const logger = new catchlogs('API_KEY', 'react-errors');
logger.init();

class ErrorBoundary extends React.Component {
    componentDidCatch(error, errorInfo) {
        catchlogs.catch(error);
    }
    
    render() {
        return this.props.children;
    }
}

// Wrap your application with ErrorBoundary
<ErrorBoundary>
    <App />
</ErrorBoundary>

Try-Catch Usage

import catchlogs from '@serkankuyu/catchlogs';

// Initialize with a specific channel for try-catch errors
const logger = new catchlogs('API_KEY', 'try-catch-errors');
logger.init();

try {
    // Code that might throw an error
    throw new Error('An error occurred');
} catch (error) {
    catchlogs.catch(error);
}

Async/Await Usage

import catchlogs from '@serkankuyu/catchlogs';

// Initialize with a specific channel for API errors
const logger = new catchlogs('API_KEY', 'api-errors');
logger.init();

async function fetchData() {
    try {
        const response = await fetch('https://api.example.com/data');
        const data = await response.json();
        return data;
    } catch (error) {
        catchlogs.catch(error);
        throw error;
    }
}

Environment Based Channel Example

import catchlogs from '@serkankuyu/catchlogs';

// Channel seçimi ortama göre otomatik yapılır
const channel = process.env.NODE_ENV === 'production' 
    ? 'production' 
    : process.env.NODE_ENV === 'staging' 
        ? 'staging' 
        : 'development';

const logger = new catchlogs('API_KEY', channel);
logger.init();

// Tüm hatalar otomatik olarak doğru kanala gönderilecek

Custom Error Reporting

const logger = new catchlogs('API_KEY', 'custom-monitoring');

async function sendCustomError(data) {
    try {
        const requestData = {
            message: data,
            type: 'custom',
            severity: 'high',
            component: 'payment-service',
            timestamp: new Date().toISOString()
        };

        const result = await logger.sendCatchlogs(requestData);
        console.log('Log sent successfully:', result);
    } catch (error) {
        console.error('Error sending log:', error.message);
    }
}

Support

If you encounter any issues or have questions, feel free to reach out through [email protected]