Skip to content

Commit

Permalink
Merge pull request #5277 from theCuriousOne/env_variable_log_date
Browse files Browse the repository at this point in the history
fix: used env variable instead of hardcode datetime format
  • Loading branch information
Unitech authored Jan 20, 2022
2 parents b636744 + d66b645 commit 9d36eae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ var Utility = module.exports = {
if (cst.PM2_LOG_DATE_FORMAT && typeof cst.PM2_LOG_DATE_FORMAT == 'string') {
// Generate timestamp prefix
function timestamp(){
return `${dayjs(Date.now()).format('YYYY-MM-DDTHH:mm:ss')}:`;
return `${dayjs(Date.now()).format(cst.PM2_LOG_DATE_FORMAT)}:`;
}

var hacks = ['info', 'log', 'error', 'warn'], consoled = {};
Expand Down

0 comments on commit 9d36eae

Please sign in to comment.