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


Java Level.FINE属性代码示例

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


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

示例1: getInputStream

public InputStream getInputStream() throws java.io.FileNotFoundException {
    if (fixIt == null) {
        if (ERR.isLoggable(Level.FINE)) {
            LogRecord rec = new LogRecord(Level.FINE, "MSG_CACHED_INPUT_STREAM");
            rec.setParameters(new Object[] { this });
            rec.setResourceBundle(NbBundle.getBundle(MIMESupport.class));
            ERR.log(rec);
        }
        InputStream is = fileObj.getInputStream();

        fixIt = new CachedInputStream(is, fileObj);
    }

    fixIt.cacheToStart();

    return fixIt;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:MIMESupport.java

示例2: convertSeverity

private static Level convertSeverity(final int severity, boolean forException, Level def) {
    Level sev = def;

    if (severity >= ERROR) {
        sev = Level.SEVERE;
    } else if (severity >= EXCEPTION) {
        sev = Level.SEVERE;
    } else if (severity >= USER) {
        sev = OwnLevel.USER;
    } else if (severity >= WARNING) {
        sev = Level.WARNING;
    } else if (severity >= INFORMATIONAL) {
        sev = forException ? Level.INFO: Level.FINE;
    }
    return sev;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:ErrorManager.java

示例3: warnIfNotInEDT

/** Weaker form of assertion to control if client's code is calling
 * winsys from ED thread. Level of logged exception is lower if
 * assertions are disabled (for releases etc).
 */
static void warnIfNotInEDT () {
    Level level = assertsEnabled ? Level.WARNING : Level.FINE;
    if(!SwingUtilities.isEventDispatchThread()) {
        // tries to catch known JDK problem, SwingUtilities.isEventDispatchThread()
        // returns false even if it *is* in ED thread.
        // if we find "java.awt.EventDispatchThread" stack line, it's probable
        // that we hit this JDK problem (see links below)
        boolean isJDKProblem = false;
        StackTraceElement[] elems = Thread.currentThread().getStackTrace();
        for (StackTraceElement elem : elems) {
            if ("java.awt.EventDispatchThread".equals(elem.getClassName())) {
                isJDKProblem = true;
                break;
            }
        }

        if (!isJDKProblem) {
            // problem somewhere in NetBeans modules' code
            Logger.getLogger(WindowManagerImpl.class.getName()).log(level, null,
                    new java.lang.IllegalStateException(
                    "Problem in some module which uses Window System: "
                    + ASSERTION_ERROR_MESSAGE));
        } else {
            // probably known problem in JDK
            Logger.getLogger(WindowManagerImpl.class.getName()).log(level, null,
                    new java.lang.IllegalStateException(
                    "Known problem in JDK occurred. If you are interested, vote and report at:\n" +
                    "http://bugs.sun.com/view_bug.do?bug_id=6424157, http://bugs.sun.com/view_bug.do?bug_id=6553239 \n" +
                    "Also see related discussion at http://www.netbeans.org/issues/show_bug.cgi?id=90590"));
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:36,代码来源:WindowManagerImpl.java

示例4: logLevel

@Override
    protected Level logLevel() {
//        return Level.FINEST;
//        return Level.FINE;
//        return Level.INFO;
        return Level.FINE;
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:EditorDocumentContentTest.java

示例5: CommandProcess

protected CommandProcess(Command command, RawProcess rawProcess) throws CommandStartException {
  this.command = checkNotNull(command);
  this.rawProcess = checkNotNull(rawProcess);
  stdoutStream = new CapturingOutputStream();
  stderrStream = new CapturingOutputStream();

  Supplier<Level> ioLogLevel = new Supplier<Level>() {
    @Override
    public Level get() {
      return CommandProcess.this.rawProcess.isAlive() ? Level.WARNING : Level.FINE;
    }
  };

  try {
    stdinPump =
        maybeStartCopyFromSourceToPipe(command.stdinSource(), rawProcess.stdinPipe(), ioLogLevel);
    stdoutPump =
        maybeStartCopyFromPipeToSink(
            rawProcess.stdoutPipe(),
            command.stdoutSink(),
            stdoutStream,
            stderrStream,
            ioLogLevel);
    stderrPump =
        maybeStartCopyFromPipeToSink(
            rawProcess.stderrPipe(),
            command.stderrSink(),
            stdoutStream,
            stderrStream,
            ioLogLevel);
  } catch (IOException e) {
    throw new CommandStartException(command, e);
  }
}
 
开发者ID:google,项目名称:ios-device-control,代码行数:34,代码来源:CommandProcess.java

示例6: sendBuildFromJob

public void sendBuildFromJob(Job job, TaskListener listener) {
    if (job != null && job.getLastBuild() != null) {
        BuildStatus status = job.isBuildable() ? (job.getLastBuild().getResult() != null
                ? BuildStatus.fromString(job.getLastBuild().getResult().toString())
                : BuildStatus.InProgress) : BuildStatus.Deleted;
        BuildBuilder builder = new BuildBuilder(job.getLastBuild(), status);
        MirrorGateResponse response = getMirrorGateService()
                .publishBuildData(builder.getBuildData());

        String msg;
        Level level;
        if (response.getResponseCode() == HttpStatus.SC_CREATED) {
            msg = "MirrorGate: Published Build Complete Data. " + response.toString();
            level = Level.FINE;
        } else {
            msg = "MirrorGate: Build Status could not been sent to MirrorGate. Please contact with " +
                    "MirrorGate Team for further information ([email protected]).";
            level = Level.WARNING;
        }

        if (listener != null && level == Level.FINE) {
            listener.getLogger().println("Follow this project's builds progress at: "
                    + createMirrorgateLink(builder.getBuildData().getProjectName()));

            listener.getLogger().println(msg);
        }
        LOG.log(level, msg);

        sendBuildExtraData(builder, listener);
    }
}
 
开发者ID:BBVA,项目名称:mirrorgate-jenkins-builds-collector,代码行数:31,代码来源:MirrorGateListenerHelper.java

示例7: randomLevel

private static Level randomLevel(Random r) {
    int lev = r.nextInt(1100);
    if (lev >= Level.SEVERE.intValue()) return Level.SEVERE;
    if (lev >= Level.WARNING.intValue()) return Level.WARNING;
    if (lev >= Level.INFO.intValue()) return Level.INFO;
    if (lev >= Level.CONFIG.intValue()) return Level.CONFIG;
    if (lev >= Level.FINE.intValue()) return Level.FINE;
    if (lev >= Level.FINER.intValue()) return Level.FINER;
    if (lev >= Level.FINEST.intValue()) return Level.FINEST;
    return Level.OFF;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:LogRecordsTest.java

示例8: testSomeNPE

public void testSomeNPE() throws Exception {
    LogRecord r = new LogRecord(Level.FINE, "UI_ACTION_EDITOR");
    Node n = UINode.create(r);
    assertNotNull(n);
    assertEquals("No name", "", n.getDisplayName());
    assertNotNull(n.getName());
    assertSerializedWell(r, n);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:DecorableTest.java

示例9: logLevel

@Override
protected Level logLevel() {
    return Level.FINE;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:InteceptorTest.java

示例10: getSevereProblemLogLevel

final Level getSevereProblemLogLevel() {
    return LanguageProviderFactory.get().getBaseLanguage() == parser.getDictionary().getLanguage() ? Level.SEVERE : Level.FINE; // TODO: This should turn into INFO for other langs;
}
 
开发者ID:salesforce,项目名称:grammaticus,代码行数:3,代码来源:GrammaticalLabelFileHandler.java

示例11: logLevel

protected Level logLevel() {
    return Level.FINE;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:3,代码来源:MIMESupport69049Test.java

示例12: logLevel

@Override protected Level logLevel() {
    return Level.FINE;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:3,代码来源:SingleModulePropertiesTest.java


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