generated from sargatxet/express-api-base
	Initial commit
This commit is contained in:
		
							
								
								
									
										13
									
								
								lib/logger.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								lib/logger.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| '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 } | ||||
		Reference in New Issue
	
	Block a user