express-api-base/lib/logger.js

14 lines
254 B
JavaScript
Raw Normal View History

2024-06-28 09:20:46 +00:00
'use strict'
// Log
const logMessage = (source, msg) => {
console.log(new Date(), `[${source}]`, msg)
}
// Error
const errorMessage = (source, msg) => {
console.error(new Date(), `[${source}]`, msg)
}
module.exports = { logMessage, errorMessage }