
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@stellarwp/mcp-logger
Advanced tools
@stellarwp/mcp-logger
)A universal logging solution for both Node.js and browser environments, built on Pino.
This package provides a consistent logging interface that works seamlessly across Node.js and browser environments, with special optimizations for MCP servers to ensure proper JSON-RPC output.
# Install the package
bun add @stellarwp/mcp-logger
# Or with npm
npm install @stellarwp/mcp-logger
import { logger } from '@stellarwp/mcp-logger';
// Different log levels
logger.debug('Debug message');
logger.info('Info message');
logger.warn('Warning message');
logger.error('Error message');
// With additional context
logger.info({ user: 'john', action: 'login' }, 'User logged in');
import { createLogger } from '@stellarwp/mcp-logger';
// Create a custom logger with a specific name
const customLogger = createLogger({ name: 'MyApp' });
customLogger.info('Custom logger initialized');
// Create a logger with custom options
const debugLogger = createLogger({
name: 'DebugModule',
level: 'trace'
});
debugLogger.trace('Detailed trace information');
import { logger } from '@stellarwp/mcp-logger';
// In Node.js, logs go to stderr with pretty formatting
logger.info('Server started on port 3000');
logger.error({ err: new Error('Connection failed') }, 'Database connection failed');
import { logger } from '@stellarwp/mcp-logger';
// In browser, logs use console methods with custom prefixing
logger.info('Page loaded successfully');
logger.warn('Deprecated API used');
import { logger } from '@stellarwp/mcp-logger';
// Logger automatically detects MCP server environment
// and routes output to stderr to avoid JSON-RPC conflicts
logger.info('MCP tool registered successfully');
logger.debug({ tool: 'wordpress-fetch' }, 'Tool configuration loaded');
The logger
instance provides standard Pino methods:
logger.trace()
- Trace level logginglogger.debug()
- Debug level logginglogger.info()
- Info level logginglogger.warn()
- Warning level logginglogger.error()
- Error level logginglogger.fatal()
- Fatal level logginglogger.child(bindings)
- Create child logger with additional contextlogger.level
- Get or set log levellogger.isLevelEnabled(level)
- Check if level is enabledThe createLogger(options)
function allows you to create custom logger instances:
createLogger(options?: pino.LoggerOptions): pino.Logger
name
- Logger name (defaults to 'MCP Server')level
- Log level (defaults to 'debug')formatters
- Custom log formattersThe package automatically selects the right implementation:
logger.node.js
with full Pino + pino-pretty functionalitylogger.browser.js
with console method fallbackspino-pretty
transportThe package provides different builds for different environments:
logger.node.js
- Full Pino functionality with pino-prettylogger.browser.js
- Console-based fallback with custom prefixinglogger.d.ts
- TypeScript definitionsFAQs
A logger that runs in both of the node and browser environments
We found that @stellarwp/mcp-logger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.