createModuleLogger = moduleName => {
  const color = loggingColors[nextColor];
  const debugRegexVar = env.getVariable('log');
  const doLogging = debugRegexVar !== null && (debugRegexVar === '*' || debugRegexVar === 'true' || new RegExp(debugRegexVar, 'gi').test(moduleName));
  nextColor = (nextColor + 1) % loggingColors.length;
  moduleName += ': ';
  return !doLogging ? func.nop : (...args) => {
    const timeNow = time.getUnixTime();
    const timeDiff = timeNow - lastLoggingTime;
    lastLoggingTime = timeNow;
    print(color, moduleName, UNCOLOR, ...args.map(arg => typeof arg === 'string' || typeof arg === 'symbol' ? arg : JSON.stringify(arg)), color, ' +' + timeDiff + 'ms');
  };
}
@param {string} moduleName
@return {function(...any):void}