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


Java LogLevel.DEBUG属性代码示例

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


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

示例1: onOutput

public void onOutput(OutputEvent event) {
    if (event instanceof LogLevelChangeEvent) {
        LogLevelChangeEvent changeEvent = (LogLevelChangeEvent) event;
        debugOutput = changeEvent.getNewLogLevel() == LogLevel.DEBUG;
    }
    if (event instanceof RenderableOutputEvent) {
        RenderableOutputEvent outputEvent = (RenderableOutputEvent) event;
        textOutput.style(outputEvent.getLogLevel() == LogLevel.ERROR ? Error : Normal);
        if (debugOutput && (textOutput.atEndOfLine || lastEvent == null || !lastEvent.getCategory().equals(outputEvent.getCategory()))) {
            if (!textOutput.atEndOfLine) {
                textOutput.println();
            }
            textOutput.text(dateFormat.format(new Date(outputEvent.getTimestamp())));
            textOutput.text(" [");
            textOutput.text(outputEvent.getLogLevel());
            textOutput.text("] [");
            textOutput.text(outputEvent.getCategory());
            textOutput.text("] ");
        }
        outputEvent.render(textOutput);
        lastEvent = outputEvent;
        textOutput.style(Normal);
    }
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:24,代码来源:StyledTextOutputBackedRenderer.java

示例2: fillInFailureResolution

private void fillInFailureResolution(FailureDetails details) {
    if (details.failure instanceof FailureResolutionAware) {
        ((FailureResolutionAware) details.failure).appendResolution(details.resolution, clientMetaData);
        if (details.resolution.getHasContent()) {
            details.resolution.append(' ');
        }
    }
    if (details.exceptionStyle == ExceptionStyle.NONE) {
        details.resolution.text("Run with ");
        details.resolution.withStyle(UserInput).format("--%s", LoggingCommandLineConverter.STACKTRACE_LONG);
        details.resolution.text(" option to get the stack trace. ");
    }
    if (loggingConfiguration.getLogLevel() != LogLevel.DEBUG) {
        details.resolution.text("Run with ");
        if (loggingConfiguration.getLogLevel() != LogLevel.INFO) {
            details.resolution.withStyle(UserInput).format("--%s", LoggingCommandLineConverter.INFO_LONG);
            details.resolution.text(" or ");
        }
        details.resolution.withStyle(UserInput).format("--%s", LoggingCommandLineConverter.DEBUG_LONG);
        details.resolution.text(" option to get more log output.");
    }
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:22,代码来源:BuildExceptionReporter.java

示例3: getBuildLogLevel

public LogLevel getBuildLogLevel() {
    LoggingCommandLineConverter converter = new LoggingCommandLineConverter();
    CommandLineParser parser = new CommandLineParser().allowUnknownOptions().allowMixedSubcommandsAndOptions();
    converter.configure(parser);
    List<String> arguments = parameters.getArguments();
    ParsedCommandLine parsedCommandLine = parser.parse(arguments == null ? Collections.<String>emptyList() : arguments);
    //configure verbosely only if arguments do not specify any log level.
    if (parameters.getVerboseLogging() && !parsedCommandLine.hasAnyOption(converter.getLogLevelOptions())) {
        return LogLevel.DEBUG;
    }

    LoggingConfiguration loggingConfiguration = converter.convert(parsedCommandLine, new DefaultLoggingConfiguration());
    return loggingConfiguration.getLogLevel();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:14,代码来源:BuildLogLevelMixIn.java

示例4: configure

public void configure(ProviderConnectionParameters parameters) {
    LogLevel providerLogLevel = parameters.getVerboseLogging() ? LogLevel.DEBUG : LogLevel.INFO;
    LOGGER.debug("Configuring logging to level: {}", providerLogLevel);
    LoggingManagerInternal loggingManager = loggingServices.newInstance(LoggingManagerInternal.class);
    loggingManager.setLevelInternal(providerLogLevel);
    loggingManager.start();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:7,代码来源:ProviderConnection.java


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