当前位置: 首页>>代码示例>>Java>>正文


Java Message.MSG_WARN属性代码示例

本文整理汇总了Java中org.apache.ivy.util.Message.MSG_WARN属性的典型用法代码示例。如果您正苦于以下问题:Java Message.MSG_WARN属性的具体用法?Java Message.MSG_WARN怎么用?Java Message.MSG_WARN使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.ivy.util.Message的用法示例。


在下文中一共展示了Message.MSG_WARN属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: log

@Override
public void log(String message, int level) {
    message = "[Ivy] " + message.trim();
    switch (level) {
    case Message.MSG_ERR:
        JkLog.error(message);
        break;
    case Message.MSG_WARN:
        JkLog.warn(message);
        break;
    case Message.MSG_INFO:
        JkLog.info(message);
        break;
    case Message.MSG_VERBOSE:
        JkLog.trace(message);
        break;
    case Message.MSG_DEBUG:
        JkLog.trace(message);
        break;
    default:
        JkLog.info("[" + level + "] " + message);
    }

}
 
开发者ID:jerkar,项目名称:jerkar,代码行数:24,代码来源:IvyMessageLogger.java

示例2: log

public static void log(int logLevel, String msg) {
    switch (logLevel) {
        case Message.MSG_DEBUG:
            debug(msg);
            break;
        case Message.MSG_VERBOSE:
            verbose(msg);
            break;
        case Message.MSG_INFO:
            info(msg);
            break;
        case Message.MSG_WARN:
            warn(msg);
            break;
        case Message.MSG_ERR:
            error(msg);
            break;
        default:
            throw new IllegalArgumentException("Unknown log level " + logLevel);
    }
}
 
开发者ID:apache,项目名称:ant-ivyde,代码行数:21,代码来源:IvyDEMessage.java

示例3: writeManifests

public static void writeManifests(Iterable<ManifestAndLocation> manifestAndLocations,
        ContentHandler handler, boolean quiet) throws SAXException {
    int level = quiet ? Message.MSG_DEBUG : Message.MSG_WARN;
    handler.startDocument();
    AttributesImpl atts = new AttributesImpl();
    handler.startElement("", RepositoryHandler.REPOSITORY, RepositoryHandler.REPOSITORY, atts);
    int nbOk = 0;
    int nbRejected = 0;
    for (ManifestAndLocation manifestAndLocation : manifestAndLocations) {
        BundleInfo bundleInfo;
        try {
            bundleInfo = ManifestParser.parseManifest(manifestAndLocation.getManifest());
            bundleInfo
                    .addArtifact(new BundleArtifact(false, manifestAndLocation.getUri(), null));
            if (manifestAndLocation.getSourceURI() != null) {
                bundleInfo.addArtifact(new BundleArtifact(true, manifestAndLocation
                        .getSourceURI(), null));
            }
            nbOk++;
        } catch (ParseException e) {
            nbRejected++;
            IvyContext
                    .getContext()
                    .getMessageLogger()
                    .log("Rejected " + manifestAndLocation.getUri() + ": " + e.getMessage(),
                        level);
            continue;
        }
        saxBundleInfo(bundleInfo, handler);
    }
    handler.endElement("", RepositoryHandler.REPOSITORY, RepositoryHandler.REPOSITORY);
    handler.endDocument();
    Message.info(nbOk + " bundle" + (nbOk > 1 ? "s" : "") + " added, " + nbRejected + " bundle"
            + (nbRejected > 1 ? "s" : "") + " rejected.");
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:35,代码来源:OBRXMLWriter.java


注:本文中的org.apache.ivy.util.Message.MSG_WARN属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。