Logging function based on winston library
@function Logger
@param {string} moduletag Name of apps module
168795
function Logger(moduletag) {
  const trimmedModule = trim(moduletag)
  winston.loggers.add(trimmedModule, {
    console: {
      colorize: true,
      label   : trimmedModule
    }
  })
  const logger = winston.loggers.get(trimmedModule)
  const defs = genericLog(logger, trimmedModule)
  defs.warn = genericLog(logger, trimmedModule, 'warn')
  defs.error = genericLog(logger, trimmedModule, 'error')
  defs.debug = genericLog(logger, trimmedModule, 'debug')
  defs.info = genericLog(logger, trimmedModule, 'info')
  return defs
}
540641
function () {
        //set logger
        if (!module.parent) {
            appHttp.use(morgan({format: 'dev'}));
            appHttps.use(morgan({format: 'dev'}));
        }
        return Q();
    }
97999
function execModule(sModuleName, bAsync) {

		var oModule = mModules[sModuleName],
			oShim = mShims[sModuleName],
			bLoggable = log.isLoggable(),
			sOldPrefix, sScript, vAMD, oMatch, bOldForceSyncDefines;

		if ( oModule && oModule.state === LOADED && typeof oModule.data !== "undefined" ) {

			// check whether the module is known to use an existing AMD loader, remember the AMD flag
			vAMD = (oShim === true || (oShim && oShim.amd)) && typeof __global.define === "function" && __global.define.amd;
			bOldForceSyncDefines = bForceSyncDefines;

			try {

				if ( vAMD ) {
					// temp. remove the AMD Flag from the loader
					delete __global.define.amd;
				}
				bForceSyncDefines = !bAsync;

				if ( bLoggable ) {
					log.debug(sLogPrefix + "executing '" + sModuleName + "'");
					sOldPrefix = sLogPrefix;
					sLogPrefix = sLogPrefix + ": ";
				}

				// execute the script in the __global context
				oModule.state = EXECUTING;
				_execStack.push({
					name: sModuleName,
					used: false
				});
				if ( typeof oModule.data === "function" ) {
					oModule.data.call(__global);
				} else if ( Array.isArray(oModule.data) ) {
					ui5Define.apply(null, oModule.data);
				} else {

					sScript = oModule.data;

					// sourceURL: Firebug, Chrome, Safari and IE11 debugging help, appending the string seems to cost ZERO performance
					// Note: IE11 supports sourceURL even when running in IE9 or IE10 mode
					// Note: make URL absolute so Chrome displays the file tree correctly
					// Note: do not append if there is already a sourceURL / sourceMappingURL
					// Note: Safari fails, if sourceURL is the same as an existing XHR URL
					// Note: Chrome ignores debug files when the same URL has already been load via sourcemap of the bootstrap file (sap-ui-core)
					// Note: sourcemap annotations URLs in eval'ed sources are resolved relative to the page, not relative to the source
					if (sScript ) {
						oMatch = /\/\/[#@] source(Mapping)?URL=(.*)$/.exec(sScript);
						if ( oMatch && oMatch[1] && /^[^/]+\.js\.map$/.test(oMatch[2]) ) {
							// found a sourcemap annotation with a typical UI5 generated relative URL
							sScript = sScript.slice(0, oMatch.index) + oMatch[0].slice(0, -oMatch[2].length) + resolveURL(oMatch[2], oModule.url);
						}
						// @evo-todo use only sourceMappingURL, sourceURL or both?
						if ( !oMatch || oMatch[1] ) {
							// write sourceURL if no annotation was there or when it was a sourceMappingURL
							sScript += "\n//# sourceURL=" + resolveURL(oModule.url) + "?eval";
						}
					}

					// framework internal hook to intercept the loaded script and modify
					// it before executing the script - e.g. useful for client side coverage
					if (typeof translate === "function") {
						sScript = translate(sScript, sModuleName);
					}

					if (__global.execScript && (!oModule.data || oModule.data.length < MAX_EXEC_SCRIPT_LENGTH) ) {
						try {
							oModule.data && __global.execScript(sScript); // execScript fails if data is empty
						} catch (e) {
							_execStack.pop();
							// eval again with different approach - should fail with a more informative exception
							/* eslint-disable no-eval */
							eval(oModule.data);
							/* eslint-enable no-eval */
							throw e; // rethrow err in case globalEval succeeded unexpectedly
						}
					} else {
						__global.eval(sScript);
					}
				}
				_execStack.pop();
				queue.process(oModule);

				if ( bLoggable ) {
					sLogPrefix = sOldPrefix;
					log.debug(sLogPrefix + "finished executing '" + sModuleName + "'");
				}

			} catch (err) {
				if ( bLoggable ) {
					sLogPrefix = sOldPrefix;
				}
				oModule.data = undefined;
				oModule.fail(err);
			} finally {

				// restore AMD flag
				if ( vAMD ) {
					__global.define.amd = vAMD;
				}
				bForceSyncDefines = bOldForceSyncDefines;
			}
		}
	}
1223654
public static void f(String tag, String msg) {
        if (sLevel > LEVEL_FATAL) {
            return;
        }
        Log.wtf(tag, msg);
    }
814031
function(parentModule, kbox, id, app, callback) {

  if (typeof callback === 'undefined' && typeof app === 'function') {
    callback = app;
    app = undefined;
  }

  // Try to load module from node_module directories.
  return requireFromNodeModules(parentModule, id)
  // If module was not found in node_module directories, try to load
  // from other directories.
  .then(function(mod) {
    if (mod) {
      return mod;
    } else {
      return requireFromOtherDirs(kbox, id, app);
    }
  })
  // Return.
  .nodeify(callback);

}
51534
function buildConsoleLogger (level = 'info') {
  return function (api) {
    return winston.createLogger({
      format: winston.format.combine(
        winston.format.timestamp(),
        winston.format.colorize(),
        winston.format.printf(info => {
          return `${api.id} @ ${info.timestamp} - ${info.level}: ${info.message} ${stringifyExtraMessagePropertiesForConsole(info)}`
        })
      ),
      level,
      levels: winston.config.syslog.levels,
      transports: [ new winston.transports.Console() ]
    })
  }
}
1305005
public static void v(String tag, String msg) {
        if (logger != null && isLoggingEnabled(tag, VERBOSE)) {
            logger.v(tag, msg);
        }
    }
360729
function deleteModule(logger, moduleName, location) {
    logger.info(`Deleting ${location} files…`);
    const modulePath = computeModulesPath(location, moduleName);

    if (fs.existsSync(modulePath)) {
        // remove module directory
        shell.rm('-rf', modulePath);

        const modulesPath = computeModulesPath(location);

        // get index file path
        const indexFullFileName = fs.readdirSync(modulesPath).find(name => name.search(/index/) >= 0);
        const indexPath = modulesPath + indexFullFileName;
        let indexContent;

        try {
            indexContent = fs.readFileSync(indexPath);
        } catch (e) {
            logger.error(chalk.red(`Failed to read ${indexPath} file`));
            process.exit();
        }

        // extract application modules
        const appModuleRegExp = /Module\(([^()]+)\)/g;
        const [, appModules] = appModuleRegExp.exec(indexContent) || ['', ''];
        const appModulesWithoutDeleted = appModules.split(',').filter(appModule => appModule.trim() !== moduleName);

        const contentWithoutDeletedModule = indexContent
            .toString()
            // remove module from modules list
            .replace(appModuleRegExp, `Module(${appModulesWithoutDeleted.toString().trim()})`)
            // remove module import
            .replace(RegExp(`import ${moduleName} from './${moduleName}';\n`, 'g'), '');

        fs.writeFileSync(indexPath, contentWithoutDeletedModule);
        runPrettier(indexPath);

        logger.info(chalk.green(`✔ Module for ${location} successfully deleted!`));
    } else {
        logger.info(chalk.red(`✘ Module ${location} location for ${modulePath} not found!`));
    }
}
74125
function logToConsole(tags, message) {
    if (enabled) {
        if (arguments.length < 2) {
            message = tags;
            tags = [];
        }

        if (!util.isArray(tags)) tags = [];

        var text = new Date().getTime() + ', ';
        if (tags.length > 0) {
            text = text + tags[0] + ', ';
        }
        text = text + message;
        console.log(text);
    }
}
1311224
public static void d(String tag, String msg) {
        if (logger != null && isLoggingEnabled(tag, DEBUG)) {
            logger.d(tag, msg);
        }
    }
360572
def log_tag(self, tag, code, multiline=False):
        """"""
        if self.tracing:
            if callable(code):
                code = code()
            tagstr = "[" + str(tag) + "]"
            if multiline:
                printerr(tagstr + "\n" + displayable(code))
            else:
                printerr(tagstr, ascii(code))
315627
function scriptTag(src, callback)  {
		
		var elem = doc.createElement('script');		
		elem.type = 'text/' + (src.type || 'javascript');
		elem.src = src.src || src;  
			
		elem.onreadystatechange = elem.onload = function() {
			var state = elem.readyState;

			if (!callback.done && (!state || /loaded|complete/.test(state))) {
				callback.call();
				callback.done = true;
			}
			
			// cleanup. IE runs into trouble
			if (!ie) {			
				head.removeChild(elem);
			}
		}; 
		
		head.appendChild(elem); 
	}
238553
function log(err, stdout, stderr, cb) {
              //And handle errors (if any)
              if (err) {
                grunt.log.errorlns(err);
              }
              else if (stderr) {
                grunt.log.errorlns(stderr);
              }
              else {
                //Otherwise load a lodash template
                var template = grunt.file.read(
                  __dirname +
                  '/view/binders.lodash');
                
                //process it with the hulk result
                var result = grunt.template.process(template, {data: {stdout: stdout}});  
                
                //And write out our bootstrap module
                grunt.file.write(
                  __dirname +
                  '/tasks/binders.js',
                  result
                );
                grunt.log.ok('hulk: generated binders.js');
                cb();
              }
          }
588015
function logger(globalName) {
  return function() {
    var args = Array.prototype.slice.call(arguments, 0);
    var global = globalName || pkg.name;

    return debug(
      args.length > 0 ?
      [global, args.join(':')].join(':') :
      global
    )
  }
}
1243585
function Logger(options)
{
  /**
   * The array to which all log messages will be added.
   *
   * @type {String[]}
   */
  var buffer = [];

  /**
   * Logs a message at a given level.
   *
   * @param {String} levelTag the tag associated with the level at which to log
   *   the message.
   * @param {String} message the message to log.
   * @param {Number} bufferMaxLength the maximum size to which the message
   *   buffer can grow.
   */
  var logMessage = function(levelTag, message, bufferMaxLength)
  {
    // add the log level tag (e.g. info, warn, etc.) to the front of the message
    message = Util.format('%s: %s', levelTag, message);

    // if the buffer is full, evict old messages
    while (buffer.length >= bufferMaxLength)
    {
      buffer.shift();
    }

    // add the new message to the buffer
    buffer.push(message);
  };

  // create an inner implementation to which all our methods will be forwarded
  var common = Core.createLogger(options, logMessage);

  /**
   * Configures this logger.
   *
   * @param {Object} options
   */
  this.configure = function(options)
  {
    common.configure(options);
  };

  /**
   * Returns the current log level.
   *
   * @returns {Number}
   */
  this.getLevel = function()
  {
    return common.getLevelNumber();
  };

  /**
   * Logs a given message at the error level.
   *
   * @param {String} message
   */
  this.error = function(message)
  {
    common.error.apply(common, arguments);
  };

  /**
   * Logs a given message at the warning level.
   *
   * @param {String} message
   */
  this.warn = function(message)
  {
    common.warn.apply(common, arguments);
  };

  /**
   * Logs a given message at the info level.
   *
   * @param {String} message
   */
  this.info = function(message)
  {
    common.info.apply(common, arguments);
  };

  /**
   * Logs a given message at the debug level.
   *
   * @param {String} message
   */
  this.debug = function(message)
  {
    common.debug.apply(common, arguments);
  };

  /**
   * Logs a given message at the trace level.
   *
   * @param {String} message
   */
  this.trace = function(message)
  {
    common.trace.apply(common, arguments);
  };

  /**
   * Returns the log buffer.
   *
   * @returns {String[]}
   */
  this.getLogBuffer = function()
  {
    // return a copy of the buffer array; calling slice() shallow-copies the
    // original array, but that's sufficient in this case because the array
    // contains strings
    return buffer.slice();
  };
}
39331
public static void logV(String localTag, String msg) {
        if (getConfig().debugMode) {
            Log.v(getConfig().logTag, "[" + localTag + "] " + msg);
        }
    }
827075
function LightLogger(logLevel){
	logger = global.console;
	
	this.log = function(msg){
		if(logLevel >= 4) logger.log(msg);
	}
	
	this.debbug = function(msg){
		if(logLevel >= 4) logger.log(msg);
	}
	
	this.info = function(msg){
		if(logLevel >= 3) logger.info(msg);
	}
	
	this.warn = function(msg){
		if(logLevel >= 2) logger.warn(msg);
	}
	
	this.error = function(msg){
		if(logLevel >= 1) logger.error(msg);
	}
}