UNPKG

log-mate

Version:

log-mate makes logging effortless & powerful—log to console, files, databases, or cloud with structured logs, encryption, real-time streaming, and auto-rotation. It’s plug & play, supports multi-transport logging, and boosts performance with async, lazy l

14 lines (10 loc) 265 B
function maskSensitive(keys, logData) { const maskedData = { ...logData }; keys.forEach(key => { if (maskedData[key]) { maskedData[key] = "****"; } }); return maskedData; } module.exports = maskSensitive;