
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@sucoza/logger-devtools-plugin
Advanced tools
Enhanced logging DevTools plugin with filtering, formatting, and TanStack integration
A comprehensive logging plugin for TanStack DevTools that provides advanced logging capabilities, real-time metrics monitoring, and powerful debugging features.
trace, debug, info, warn, error, fatalnpm install @sucoza/logger-devtools-plugin
import { logger } from '@sucoza/logger-devtools-plugin';
// Simple logging
logger.info('Application started');
logger.warn('Low memory', { available: '100MB' });
logger.error('Failed to connect', new Error('Network error'));
// With additional data
logger.debug('User action', {
action: 'button_click',
userId: 123,
timestamp: Date.now()
});
import { TanStackDevtools } from '@tanstack/react-devtools';
import { LoggerDevToolsPanel } from '@sucoza/logger-devtools-plugin';
function App() {
return (
<>
{/* Your app */}
<TanStackDevtools
plugins={[
{
name: 'Logger',
render: () => <LoggerDevToolsPanel />,
},
]}
/>
</>
);
}
Create specialized loggers for different parts of your application:
// Create category-specific loggers
const apiLogger = logger.child({
category: 'API',
context: { service: 'backend', version: '1.0.0' }
});
const dbLogger = logger.child({
category: 'Database',
tags: ['postgres', 'queries']
});
// All logs from these will include the preset context
apiLogger.info('Request received', { endpoint: '/users' });
dbLogger.debug('Query executed', { query: 'SELECT * FROM users' });
Automatically capture all console.* calls in your application:
// Enable console interception (preserves original console output)
logger.enableConsoleCapture();
// Enable with options
logger.enableConsoleCapture({
preserveOriginal: false, // Don't output to browser console
includeTrace: true // Include stack traces for better source tracking
});
// Disable console interception
logger.disableConsoleCapture();
// Check if console capture is enabled
const isEnabled = logger.isConsoleCaptureEnabled();
Once enabled, all console calls will appear in the DevTools logger:
console.log('This will be captured'); // → Info level
console.warn('This is a warning'); // → Warn level
console.error('This is an error'); // → Error level
console.debug('Debug information'); // → Debug level
Control logging behavior dynamically:
// Enable/disable logging globally
logger.setEnabled(false);
// Change global log level
logger.setLevel('error'); // Only error and fatal logs
// Configure specific categories
logger.setCategoryConfig('API', {
enabled: true,
level: 'debug' // Different level for API logs
});
// Get current configuration
const config = logger.getConfig();
// Get current metrics
const metrics = logger.getMetrics();
try {
await riskyOperation();
} catch (error) {
logger.error('Operation failed', error, {
category: 'Operations',
context: {
userId: currentUser.id,
operation: 'data_sync',
attempt: retryCount
},
tags: ['critical', 'retry-failed']
});
}
const perfLogger = logger.child({ category: 'Performance' });
const startTime = performance.now();
await expensiveOperation();
const duration = performance.now() - startTime;
perfLogger.info('Operation completed', {
duration,
threshold: 1000,
exceeded: duration > 1000
});
interface LoggerConfig {
enabled: boolean; // Global enable/disable
level: LogLevel; // Minimum log level
categories: { // Category-specific settings
[key: string]: {
enabled: boolean;
level?: LogLevel;
}
};
output: {
console: boolean; // Log to browser console
devtools: boolean; // Send to DevTools panel
};
maxLogs: number; // Maximum logs to keep (default: 10000)
batchSize: number; // Batch size for transmission (default: 50)
flushInterval: number; // Auto-flush interval in ms (default: 100)
}
Click any log entry to see:
Real-time metrics including:
Export filtered logs in multiple formats:
trace(message, data?, options?) - Detailed trace informationdebug(message, data?, options?) - Debug-level messagesinfo(message, data?, options?) - Informational messageswarn(message, data?, options?) - Warning messageserror(message, data?, options?) - Error messagesfatal(message, data?, options?) - Fatal error messageschild(options) - Create a child logger with preset optionssetEnabled(enabled) - Enable/disable loggingsetLevel(level) - Set minimum log levelsetCategoryConfig(category, config) - Configure a categorygetConfig() - Get current configurationgetMetrics() - Get current metricsforceFlush() - Force flush pending logsexportLogs(format) - Export logs in specified formatMIT
Part of the @sucoza TanStack DevTools ecosystem.
FAQs
Enhanced logging DevTools plugin with filtering, formatting, and TanStack integration
We found that @sucoza/logger-devtools-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.