
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.
Make your terminal string output even more beautiful 💖
A modern, lightweight logging library for Node.js that provides beautiful colored output, rainbow text, custom formatting, and structured logging capabilities.
npm install charmlog
// ES Modules
import charmlog from 'charmlog';
// CommonJS
const charmlog = require('charmlog').default;
// Basic usage
charmlog.blue('Hello, World!');
charmlog.rainbow('This is a rainbow text!');
charmlog.printf('Custom formatted text');
// Basic colors
charmlog.red('Error message');
charmlog.green('Success message');
charmlog.yellow('Warning message');
charmlog.blue('Info message');
charmlog.magenta('Debug message');
charmlog.cyan('Trace message');
charmlog.white('Normal message');
charmlog.black('Dark message');
// Rainbow colored text
charmlog.rainbow('This text will be rainbow colored!');
// Set formatting options
charmlog.settings.color = '#ff0000';
charmlog.settings.backgroundColor = '#000000';
charmlog.settings.fontWeight = 'bold';
charmlog.settings.style = 'italic';
// Apply formatting
charmlog.printf('Custom formatted text');
import { Logger } from 'charmlog';
const logger = new Logger('info');
logger.debug('Debug message');
logger.info('Info message');
logger.warning('Warning message');
logger.error('Error message');
logger.critical('Critical message');
const obj = {
name: 'John',
age: 30,
hobbies: ['coding', 'reading'],
address: {
city: 'New York',
country: 'USA'
}
};
charmlog.dir(obj);
import { charmprint, createCharmedObject } from 'charmlog';
// Wrap any function to auto-log its output
const wrappedFn = charmprint((a, b) => a + b);
wrappedFn(2, 3); // Logs: 5
// Create a charmed object
const myObj = createCharmedObject({
greet: (name) => `Hello, ${name}!`
});
myObj.greet('World'); // Auto-logs the result
import { colors } from 'charmlog';
// Access individual color methods
colors.red('This is red');
colors.green('This is green');
import { Logger } from 'charmlog';
const logger = new Logger('warning', true); // Only show warnings and above
logger.setLogLevel('error'); // Change log level
logger.reset(); // Reset to default settings
import { settings } from 'charmlog';
// Configure text formatting
settings.color = '#ff0000';
settings.backgroundColor = 'transparent';
settings.fontWeight = 'bold';
settings.style = 'normal';
settings.textDecoration = 'underline';
// Reset all settings
settings.reset();
The library includes full TypeScript support with comprehensive type definitions.
CharmLog is compatible with:
// Only import what you need
import { red, green } from 'charmlog';
import { Logger } from 'charmlog';
We welcome contributions! Please see our Contributing Guide for details.
git clone https://github.com/antisedativ/CharmLog.git
cd CharmLog
npm install
npm run build
npm test
Made with ❤️ by the Charmlog
FAQs
Library to improve logging
We found that charmlog demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.

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.