node_modules/contentful-batch-libs/dist/logging.js
// Format log message to display them as task status
Format log message to display them as task status
Format log message to display them as task status
function logToTaskOutput(task) {
  function logToTask(logMessage) {
    var content = formatLogMessageOneLine(logMessage);
    var symbols = {
      'info': _figures2.default.tick,
      'warning': _figures2.default.warning,
      'error': _figures2.default.cross
    };
    task.output = `${symbols[logMessage.level]} ${content}`.trim();
  }
  var startTime = Date.now();
  logEmitter.on('display', logToTask);
  return function () {
    var seconds = Math.ceil((Date.now() - startTime) / 1000);
    task.title = `${task.title} (${seconds}s)`;
    logEmitter.removeListener('display', logToTask);
  };
}
function logToTaskOutput ( task ) { function logToTask ( logMessage ) { var content = formatLogMessageOneLine ( logMessage ) ; var symbols = { 'info' : _figures2 . default . tick , 'warning' : _figures2 . default . warning , 'error' : _figures2 . default . cross } ; task . output = ` ${ symbols [ logMessage . level ] } ${ content } ` . trim ( ) ; } var startTime = Date . now ( ) ; logEmitter . on ( 'display' , logToTask ) ; return function ( ) { var seconds = Math . ceil ( ( Date . now ( ) - startTime ) / 1000 ) ; task . title = ` ${ task . title } ${ seconds } ` ; logEmitter . removeListener ( 'display' , logToTask ) ; } ; }
Format log message to display them as task status
Format log message to display them as task status