sassy-log
v1.0.0
Published
Logging, but with sass, satire, and some serious fun. A developer-first NPM package that replaces boring console.log() statements with snarky, sarcastic, or corporate-smooth one-liners.
Downloads
10
Maintainers
Readme
🔥 sassy-log
Logging, but with sass, satire, and some serious fun.
Created with ❤️ by imankii01
🧠 What Is It?
sassy-log is a developer-first NPM package that replaces boring console.log() statements with snarky, sarcastic, or corporate-smooth one-liners. It's a lightweight wrapper around your standard logging that adds humor and flavor to everyday logs — turning your terminal into a place of laughter, roast, and personality.
Instead of this:
console.log("User created")You get:
log.success("User created")
// => "✅ Well, well, look who can CRUD. | Original: 'User created'"💡 Why It Exists
Developers spend hours staring at logs — but logs are often dry, robotic, or completely emotionless. sassy-log injects life into the debugging process by making logs feel like a teammate — whether that's a sarcastic senior dev, an overly positive intern, or a corporate manager sugarcoating a failure.
This is more than just fun — it's:
- A morale booster for dev teams
- A memory anchor (you'll remember a funny log better)
- A great way to differentiate environments (prod = corporate, dev = savage)
- Cross-platform compatible (Windows, macOS, Linux, any terminal)
📦 Installation
npm install sassy-logOr with yarn:
yarn add sassy-log🚀 Quick Start
const sassyLogger = require('sassy-log');
// Create a logger with your preferred personality
const log = sassyLogger({ mode: 'sarcastic' });
// Use it like console.log, but with personality
log('Data fetched');
// => "💬 Oh great, more data you don't know what to do with. | Original: 'Data fetched'"
log.success('User updated');
// => "✅ Well, would you look at that. It actually worked. | Original: 'User updated'"
log.warn('API deprecated');
// => "⚠️ Oh look, a warning. I'm sure you'll totally pay attention to this one. | Original: 'API deprecated'"
log.error('Server crashed');
// => "❌ Surprise! It's broken. Who could have seen this coming? | Original: 'Server crashed'"🎯 Core Modes
| Mode | Personality | Example | |------|-------------|---------| | savage | Brutally honest dev-style roasts | "Congrats. You broke it. Again." | | friendly | Positive & cheerful | "Oops! But you got this, champ 💪" | | sarcastic | Passive-aggressive (default) | "Oh wow, another null. Shocking." | | corporate | Polite and professional | "A minor disruption was observed during execution." |
🛠️ Advanced Usage
Configuration Options
const log = sassyLogger({
mode: 'savage', // savage, friendly, sarcastic, corporate
colors: true, // Enable/disable colors (auto-detected)
timestamps: false, // Add timestamps to logs
emojis: true, // Enable/disable emojis
customQuotes: {} // Add your own quotes
});Mode Switching at Runtime
const log = sassyLogger({ mode: 'friendly' });
log.info('Starting in friendly mode');
// => "😊 Hey there! Just keeping you in the loop!"
log.setMode('savage');
log.info('Now in savage mode');
// => "💬 Oh great, more data you don't know what to do with."
// Check current mode
console.log(log.getMode()); // => "savage"
// See all available modes
console.log(log.getAvailableModes()); // => ["savage", "friendly", "sarcastic", "corporate"]Method Chaining
const log = sassyLogger({ mode: 'sarcastic' });
log
.info('Starting process')
.success('Step 1 complete')
.warn('Step 2 has issues')
.error('Process failed')
.info('Retrying...');Custom Quotes
const log = sassyLogger({ mode: 'savage' });
// Add your own sassy quotes
log.addCustomQuotes('savage', 'info', [
'Oh look, another "temporary" solution that will last forever.',
'Breaking: Your code did something. Medal ceremony at 3 PM.'
]);
log.info('Custom sass activated');
// => Might show one of your custom quotes!Environment-Based Configuration
// Perfect for different environments
const log = sassyLogger({
mode: process.env.NODE_ENV === 'production' ? 'corporate' : 'savage',
colors: process.env.NODE_ENV !== 'production',
timestamps: process.env.NODE_ENV === 'production'
});🌟 Platform Compatibility
sassy-log works everywhere JavaScript runs:
- ✅ Node.js (12.0.0+)
- ✅ Windows (CMD, PowerShell, Windows Terminal)
- ✅ macOS (Terminal, iTerm2)
- ✅ Linux (Any terminal)
- ✅ CI/CD (GitHub Actions, Travis, CircleCI, etc.)
- ✅ VS Code integrated terminal
- ✅ Docker containers
- ✅ Serverless functions
- ✅ React/Next.js (browser console)
- ✅ Electron apps
Color Support
Colors are automatically detected and enabled when supported:
- ✅ Modern terminals (supports 256+ colors)
- ✅ VS Code, WebStorm, other IDEs
- ✅ CI environments with color support
- ❌ Plain text environments (automatically disabled)
📊 API Reference
Main Methods
| Method | Description | Example |
|--------|-------------|---------|
| log(msg?) | Default info logging | log('Hello') |
| info(msg?) | Information logging | log.info('Process started') |
| success(msg?) | Success logging | log.success('Task completed') |
| warn(msg?) | Warning logging | log.warn('Memory high') |
| error(msg?) | Error logging | log.error('Connection failed') |
Configuration Methods
| Method | Description | Returns |
|--------|-------------|---------|
| setMode(mode) | Change logging mode | SassyLogger |
| getMode() | Get current mode | string |
| getAvailableModes() | List all modes | string[] |
| setColors(enabled) | Toggle colors | SassyLogger |
| setTimestamps(enabled) | Toggle timestamps | SassyLogger |
| setEmojis(enabled) | Toggle emojis | SassyLogger |
| addCustomQuotes(mode, type, quotes) | Add custom quotes | SassyLogger |
🎨 Examples in Action
Express.js Middleware
const express = require('express');
const sassyLogger = require('sassy-log');
const app = express();
const log = sassyLogger({ mode: 'sarcastic', timestamps: true });
app.use((req, res, next) => {
log.info(`${req.method} ${req.path}`);
next();
});
app.get('/', (req, res) => {
log.success('Home page served');
res.send('Hello World!');
});
app.listen(3000, () => {
log.success('Server running on port 3000');
});CLI Tool
#!/usr/bin/env node
const sassyLogger = require('sassy-log');
const log = sassyLogger({ mode: 'friendly', colors: true });
async function deploy() {
log.info('Starting deployment...');
try {
// Deployment logic here
log.success('Deployment completed!');
} catch (error) {
log.error('Deployment failed');
process.exit(1);
}
}
deploy();React/Next.js (Browser)
import sassyLogger from 'sassy-log';
const log = sassyLogger({
mode: 'savage',
colors: false, // Browser console handles colors differently
emojis: true
});
function MyComponent() {
useEffect(() => {
log.info('Component mounted');
return () => {
log.warn('Component unmounting');
};
}, []);
const handleClick = () => {
log.success('Button clicked');
};
return <button onClick={handleClick}>Click me</button>;
}🧪 Testing
Run the built-in tests:
# Basic functionality test
npm test
# See basic examples
npm run example
# See mode switching examples
npm run example-modes🔧 TypeScript Support
Full TypeScript support is included:
import sassyLogger, { SassyLoggerOptions, SassyLoggerInstance } from 'sassy-log';
const options: SassyLoggerOptions = {
mode: 'savage',
colors: true,
timestamps: false,
emojis: true
};
const log: SassyLoggerInstance = sassyLogger(options);
log.info('TypeScript works perfectly!');🤝 Contributing
We love contributions! Here's how you can help make sassy-log even more awesome:
Adding New Quotes
- Fork the repository
- Edit
lib/quotes.js - Add your hilarious quotes to any mode
- Submit a pull request
Adding New Modes
Want to add a new personality mode?
- Add your mode to
lib/quotes.js - Update the TypeScript definitions
- Add examples and tests
- Submit a pull request
Ideas for New Modes
desi- Indian developer humorgen-z- Modern internet slangshakespearean- Olde English stylepirate- Arrr, matey!motivational- Life coach vibes
📈 Use Cases
- Solo devs who want logs that talk back
- Dev teams using humorous logs in pull requests or Slack threads
- Startups looking for playful internal tooling
- CLI tools that want personality
- Internal dashboards with fun notification logs
- Learning projects to make coding more enjoyable
- Debugging sessions that need some comic relief
🗺️ Roadmap
- [ ] AI-powered roast generation using OpenAI/Gemini
- [ ] Plugin system for custom modes
- [ ] Log aggregation and analytics
- [ ] Slack/Discord webhook integration
- [ ] Voice output for the ultimate sass experience
- [ ] Custom emoji sets
- [ ] Log theming and styling options
- [ ] Performance metrics integration
📝 License
MIT © imankii01
🙏 Acknowledgments
- Inspired by the need for more personality in developer tools
- Built with love for the developer community
- Thanks to all contributors and users who make this project awesome
📞 Connect with the Creator
- GitHub: @imankii01
- NPM: @imankii01
- Issues: Report bugs or request features
Made with ❤️ and a lot of sass by imankii01
Because debugging should be fun, not frustrating! 🎉
📋 Quick Reference
// Basic usage
const log = require('sassy-log')();
// All methods
log('info message');
log.info('info message');
log.success('success message');
log.warn('warning message');
log.error('error message');
// Configuration
log.setMode('savage');
log.setColors(true);
log.setTimestamps(true);
log.setEmojis(false);
// Custom quotes
log.addCustomQuotes('savage', 'info', ['Your custom sass here']);
// Chaining
log.info('start').success('middle').error('end');Now go forth and log with sass! 🔥# sassy-log
