本文整理了Java中jline.internal.Log.logWithJul()
方法的一些代码示例,展示了Log.logWithJul()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log.logWithJul()
方法的具体详情如下:
包路径:jline.internal.Log
类名称:Log
方法名:logWithJul
暂无
代码示例来源:origin: jline/jline
@TestAccessible
static void log(final Level level, final Object... messages) {
if (useJul) {
logWithJul(level, messages);
return;
}
//noinspection SynchronizeOnNonFinalField
synchronized (output) {
output.format("[%s] ", level);
for (int i=0; i<messages.length; i++) {
// Special handling for the last message if its a throwable, render its stack on the next line
if (i + 1 == messages.length && messages[i] instanceof Throwable) {
output.println();
((Throwable)messages[i]).printStackTrace(output);
}
else {
render(output, messages[i]);
}
}
output.println();
output.flush();
}
}
代码示例来源:origin: com.typesafe.sbt/incremental-compiler
@TestAccessible
static void log(final Level level, final Object... messages) {
if (useJul) {
logWithJul(level, messages);
return;
}
//noinspection SynchronizeOnNonFinalField
synchronized (output) {
output.format("[%s] ", level);
for (int i=0; i<messages.length; i++) {
// Special handling for the last message if its a throwable, render its stack on the next line
if (i + 1 == messages.length && messages[i] instanceof Throwable) {
output.println();
((Throwable)messages[i]).printStackTrace(output);
}
else {
render(output, messages[i]);
}
}
output.println();
output.flush();
}
}
内容来源于网络,如有侵权,请联系作者删除!