Private: send a warning out to the logger

 error - Exception object
 type  - String of the Content-Type
341939
def warn!(error, type)
      return unless logger
      message = "[Rack::Parser] Error on %s : %s" % [type, error.to_s]
      logger.warn message
    end
563121
def log_error(cls, msg):
        
        cls.error_logger.error(msg)
        cls.debug_logger.debug(msg)
1111813
protected void logProblem(PropertyDescriptor pd, Object anObject, Object aValue, String msg)
    {
        Logger logger = getLog();
        logger.error("Error in [PersistentFieldPropertyImpl], " + msg);
        logger.error("Declaring class [" + getDeclaringClass().getName() + "]");
        logger.error("Property Name [" + getName() + "]");
        logger.error("Property Type [" + pd.getPropertyType().getName() + "]");

        if (anObject != null)
        {
            logger.error("anObject was class [" + anObject.getClass().getName() + "]");
        }
        else
        {
            logger.error("anObject was null");
        }
        if (aValue != null)
        {
            logger.error("aValue was class [" + aValue.getClass().getName() + "]");
        }
        else
        {
            logger.error("aValue was null");
        }
    }
178517
def warn_import_error(type_of_obj_support: str, caught: ImportError):
    
    msg = StringIO()
    msg.writelines('Import Error while trying to add support for ' + type_of_obj_support + '. You may continue but '
                   'the associated parsers and converters wont be available : \n')
    traceback.print_tb(caught.__traceback__, file=msg)
    msg.writelines(str(caught.__class__.__name__) + ' : ' + str(caught) + '\n')
    warn(msg.getvalue())
941035
def on_error(self, content):
        
        error_policy = self.conf.get('error', 'notify')
        if error_policy == 'ignore':
            if content:
                logger.error("Ignoring error in %s",
                             repr(content)[:60])
            return None
        elif error_policy == 'notify':
            logger.debug("Notifying on error")
            return content
        else:
            logger.warning("Unknown error policy: %r", error_policy)
            logger.info("Defaulting to 'notify'")
            return content
521201
public void logError(String message, Exception exception) {
        if (!(logError || globalLog.logError))
            return;
	
        if (errorLog != null)
            log(errorLog, "ERROR", owner, message, exception);
        else 
            log(globalLog.errorLog, "ERROR", owner, message, exception);
    }
1013652
def exception(self, message, *args, **kwargs):
        
        self.logger.exception(message, *args, **kwargs)
638403
function error (out, desc) {
  logger.error(header())
  if (desc) {
    logger.error(desc)
  }
  logger.error(out)
  logger.error()
}
731791
def problem_serializing(value, e=None):
    
    from mo_logs import Log

    try:
        typename = type(value).__name__
    except Exception:
        typename = "<error getting name>"

    try:
        rep = text_type(repr(value))
    except Exception as _:
        rep = None

    if rep == None:
        Log.error(
            "Problem turning value of type {{type}} to json",
            type=typename,
            cause=e
        )
    else:
        Log.error(
            "Problem turning value ({{value}}) of type {{type}} to json",
            value=rep,
            type=typename,
            cause=e
        )
1284203
function printWarning(context, kind, err)
{
	if (context !== null) {
		console.error('warn: %s: %s', context.label(), err.message);
	} else {
		console.error('warn: %s', err.message);
	}
}
426700
function(logger) {
			if (typeof logger != "object"
				|| typeof logger.info != "function"
				|| typeof logger.debug != "function"
				|| typeof logger.warning != "function"
				|| typeof logger.error != "function"
			) {
				throw new Error("Logger is not valid. It should implement at least the functions: info, debug, warning, error.");
			}
			_private.oLog = logger;
		}
345682
def warn(message = nil, ex = nil, data = nil, &block)
      log(WARN, message, ex, data, block)
    end
94851
function logJsHintWarning (errors)
{
    totalIssues += errors.length;

    var sourceFile = pathHelper.makeRelative(this.resourcePath);
    gulpUtil.log(gulpUtil.colors.yellow("jshint warning") + " in " + sourceFile);

    for (var i = 0, l = errors.length; i < l; i++)
    {
        var error = errors[i];

        gulpUtil.log(
            "    in " +
            gulpUtil.colors.blue("line " + error.line + " @ char " + error.character) +
            ": " +
            error.reason +
            " (" + error.code + ")"
        );

        if (typeof error.evidence === "string")
        {
            gulpUtil.log(
                "        " +
                gulpUtil.colors.gray(error.evidence.replace(/^\s*|\s*$/, ""))
            );
        }

        gulpUtil.log("");
    }
}
711734
def log_error(self, msg, *args):
        """"""
        if self._logger is not None:
            self._logger.error(msg, *args)
        else:
            print(msg % args)
249190
function PrimusError(message, logger) {
  Error.captureStackTrace(this, this.constructor);

  this.message = message;
  this.name = this.constructor.name;

  if (logger) {
    logger.emit('log', 'error', this);
  }
}
1021176
private void printWarning(PropertyImpl property, Exception exception) throws RepositoryException
   {
      if (PropertyManager.isDevelopping())
      {
         LOG.warn("Binary value reader error, content by path " + property.getPath() + ", property id "
            + property.getData().getIdentifier() + " : " + exception.getMessage(), exception);
      }
      else
      {
         LOG.warn("Binary value reader error, content by path " + property.getPath() + ", property id "
            + property.getData().getIdentifier() + " : " + exception.getMessage());
      }
   }
774510
protected void error(String message, Element source, Throwable cause) {
    logger.error(message);
  }