Socket
Book a DemoInstallSign in
Socket

@kano/debug-logger

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@kano/debug-logger

A unified debug logging system for StemFM applications, providing comprehensive logging, performance monitoring, and debugging capabilities.

0.1.4
unpublished
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

@stemfm/debug-logger

A unified debug logging system for StemFM applications, providing comprehensive logging, performance monitoring, and debugging capabilities.

Features

  • Unified logging system with categorization
  • Performance monitoring and metrics
  • Memory usage tracking
  • Network request/response monitoring
  • React hooks for component integration
  • GraphQL operation tracking
  • Audio chunk monitoring
  • Source mapping and stack trace analysis

Installation

yarn add @stemfm/debug-logger

Basic Usage

import debugLogger from '@stemfm/debug-logger';

// Enable logging
debugLogger.enable();

// Log messages
debugLogger.log('NETWORK', 'API Request', { url: '/api/endpoint' });

// Enable specific categories
debugLogger.enableCategory('AUDIO');
debugLogger.enableCategory('PERFORMANCE');

React Integration

import { useDebugLogger } from '@stemfm/debug-logger';

function MyComponent() {
    const logger = useDebugLogger({
        componentName: 'MyComponent',
        trackProps: true,
        trackLifecycle: true
    });

    logger.log('Component initialized');
    
    return <div>My Component</div>;
}

Performance Monitoring

import { useDebugMetrics } from '@stemfm/debug-logger';

function PerformanceMonitor() {
    const metrics = useDebugMetrics();
    
    // Access performance metrics
    console.log('Network stats:', metrics?.network);
    console.log('Memory usage:', metrics?.memory);
    
    return null;
}

Categories

  • NETWORK: Network requests and responses
  • AUDIO: Audio processing and playback
  • COMPONENT: React component lifecycle
  • MEMORY: Memory usage and leaks
  • ERROR: Error tracking
  • SYSTEM: System-level events
  • AUDIO_ENGINE: Audio engine operations
  • THE_MAGI: The MAGI system events
  • SEARCH: Search operations
  • STATION: Station-related events
  • DEBUG: General debugging
  • BANDWIDTH: Bandwidth usage
  • PERFORMANCE: Performance metrics

Configuration

debugLogger.updateConfig({
    enabled: true,
    maxStoredLogs: 1000,
    persistLogs: true,
    consoleOutput: true,
    performanceMonitoring: {
        enabled: true,
        sampleRate: 60000,
        retentionPeriod: 3600000
    }
});

Development

# Install dependencies
yarn install

# Build package
yarn build

# Run tests
yarn test

# Run linter
yarn lint

License

Private - StemFM

FAQs

Package last updated on 25 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.