
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@logscout/node
Advanced tools
Official Node.js client for LogScout - Modern log management platform.
npm install @logscout/node
# or
yarn add @logscout/node
# or
pnpm add @logscout/node
import { LogScout } from '@logscout/node';
const logger = new LogScout({
apiKey: 'your-api-key',
});
// Log messages at different levels
await logger.info('Application started');
await logger.debug('Processing request', { metadata: { requestId: '123' } });
await logger.warn('High memory usage detected');
await logger.error('Failed to connect to database', {
source: 'database',
metadata: { host: 'localhost', port: 5432 }
});
await logger.fatal('Unrecoverable error, shutting down');
import { LogScout } from '@logscout/node';
const logger = new LogScout({
// Required
apiKey: 'your-api-key',
// Optional
dev: false, // Use development API (api.dev.logscout.dev)
defaultSource: 'app', // Default source for all logs
defaultMetadata: { // Default metadata included with all logs
environment: 'production',
version: '1.0.0',
},
timeout: 10000, // Request timeout in ms
retry: true, // Retry failed requests
maxRetries: 3, // Maximum retry attempts
});
DEBUG - Detailed debug informationINFO - Interesting eventsWARN - Exceptional occurrences that are not errorsERROR - Runtime errorsFATAL - Critical errors causing shutdownlog(level, message, options?)Send a log entry with a specific level.
await logger.log('ERROR', 'Something went wrong', {
source: 'api',
metadata: { userId: 123 },
});
debug(message, options?)info(message, options?)warn(message, options?)error(message, options?)fatal(message, options?)Convenience methods for each log level.
await logger.error('Connection failed', {
source: 'database',
metadata: { error: err.message },
});
interface LogOptions {
source?: string; // Override default source
metadata?: Record<string, unknown>; // Additional metadata
}
All logging methods return a LogResponse:
interface LogResponse {
success: boolean;
id?: string; // Log entry ID on success
error?: string; // Error message on failure
}
Use the dev flag to send logs to the development API:
const logger = new LogScout({
apiKey: 'your-dev-api-key',
dev: true, // Sends to api.dev.logscout.dev
});
You can also use the factory function:
import { createLogScout } from '@logscout/node';
const logger = createLogScout({
apiKey: 'your-api-key',
});
This package includes TypeScript definitions. All types are exported:
import type {
LogLevel,
LogScoutConfig,
LogPayload,
LogOptions,
LogResponse
} from '@logscout/node';
The client handles errors gracefully and returns them in the response:
const result = await logger.error('Something failed');
if (!result.success) {
console.error('Failed to send log:', result.error);
}
By default, failed requests are retried with exponential backoff:
Disable retries:
const logger = new LogScout({
apiKey: 'your-api-key',
retry: false,
});
MIT
FAQs
Official Node.js client for LogScout - Modern log management platform
We found that @logscout/node 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.