Skip to content

Instantly share code, notes, and snippets.

View MrPeker's full-sized avatar
🎯
Focusing

Mehmet Ali Peker MrPeker

🎯
Focusing
View GitHub Profile
@MrPeker
MrPeker / consoleLog.js
Last active November 9, 2019 22:09
Customize your console log output for don't ask "this output from which line?"
let log = console.log;
console.log = function() {
log("");
log.apply(console, arguments);
let info = new Error().stack.split(' at ')[2].trim().split(__dirname);
log('-- from', '\x1b[33m', info[0].split(' (')[0], '\x1b[0m', 'at', '\x1b[33m', info[1], '\x1b[0m');
};