本文整理了Java中jline.internal.Log.warn()
方法的一些代码示例,展示了Log.warn()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log.warn()
方法的具体详情如下:
包路径:jline.internal.Log
类名称:Log
方法名:warn
暂无
代码示例来源:origin: jline/jline
public OSvTerminal() {
super(true);
setAnsiSupported(true);
try {
if (stty == null) {
sttyClass = Class.forName("com.cloudius.util.Stty");
stty = sttyClass.newInstance();
}
} catch (Exception e) {
Log.warn("Failed to load com.cloudius.util.Stty", e);
}
}
代码示例来源:origin: jline/jline
public void flush() throws IOException {
Log.trace("Flushing history");
if (!file.exists()) {
File dir = file.getParentFile();
if (!dir.exists() && !dir.mkdirs()) {
Log.warn("Failed to create directory: ", dir);
}
if (!file.createNewFile()) {
Log.warn("Failed to create file: ", file);
}
}
PrintStream out = new PrintStream(new BufferedOutputStream(new FileOutputStream(file)));
try {
for (Entry entry : this) {
out.println(entry.value());
}
}
finally {
out.close();
}
}
代码示例来源:origin: jline/jline
public void purge() throws IOException {
Log.trace("Purging history");
clear();
if (!file.delete()) {
Log.warn("Failed to delete history file: ", file);
}
}
}
代码示例来源:origin: jline/jline
protected void loadKeys(String appName, URL inputrcUrl) {
keys = keyMaps.get(KeyMap.EMACS);
try {
InputStream input = inputrcUrl.openStream();
try {
loadKeys(input, appName);
Log.debug("Loaded user configuration: ", inputrcUrl);
}
finally {
try {
input.close();
} catch (IOException e) {
// Ignore
}
}
}
catch (IOException e) {
if (inputrcUrl.getProtocol().equals("file")) {
File file = new File(inputrcUrl.getPath());
if (file.exists()) {
Log.warn("Unable to read user configuration: ", inputrcUrl, e);
}
} else {
Log.warn("Unable to read user configuration: ", inputrcUrl, e);
}
}
}
代码示例来源:origin: jline/jline
private static synchronized void runTasks() {
Log.debug("Running all shutdown-hook tasks");
// Iterate through copy of tasks list
for (Task task : tasks.toArray(new Task[tasks.size()])) {
Log.debug("Running task: ", task);
try {
task.run();
}
catch (Throwable e) {
Log.warn("Task failed", e);
}
}
tasks.clear();
}
代码示例来源:origin: jline/jline
private static Properties initProperties() {
URL url = determineUrl();
Properties props = new Properties();
try {
loadProperties(url, props);
}
catch (FileNotFoundException e) {
// debug here and no stack trace, as this can happen normally if default jline.rc file is missing
Log.debug("Unable to read configuration: ", e.toString());
}
catch (IOException e) {
Log.warn("Unable to read configuration from: ", url, e);
}
return props;
}
代码示例来源:origin: jline/jline
Log.warn("Unable to parse user configuration: ", e);
代码示例来源:origin: com.typesafe.sbt/incremental-compiler
public OSvTerminal() {
super(true);
setAnsiSupported(true);
try {
if (stty == null) {
sttyClass = Class.forName("com.cloudius.util.Stty");
stty = sttyClass.newInstance();
}
} catch (Exception e) {
Log.warn("Failed to load com.cloudius.util.Stty", e);
}
}
代码示例来源:origin: domino-succ/domino
private void touch() {
Put put = new Put(startIdBytes);
put.add(DominoConst.TRANSACTION_META_FAMILY, DominoConst.TRANSACTION_TS,
startId, DominoConst.tsToBytes(System.currentTimeMillis()));
try {
metaTable.put(put);
}
catch (IOException ioe) {
Log.warn("Error reporting liveness: {}", ioe.toString());
}
}
代码示例来源:origin: com.typesafe.sbt/incremental-compiler
public void flush() throws IOException {
Log.trace("Flushing history");
if (!file.exists()) {
File dir = file.getParentFile();
if (!dir.exists() && !dir.mkdirs()) {
Log.warn("Failed to create directory: ", dir);
}
if (!file.createNewFile()) {
Log.warn("Failed to create file: ", file);
}
}
PrintStream out = new PrintStream(new BufferedOutputStream(new FileOutputStream(file)));
try {
for (Entry entry : this) {
out.println(entry.value());
}
}
finally {
out.close();
}
}
代码示例来源:origin: com.typesafe.sbt/incremental-compiler
protected void loadKeys(String appName, URL inputrcUrl) {
keys = keyMaps.get(KeyMap.EMACS);
try {
InputStream input = inputrcUrl.openStream();
try {
loadKeys(input, appName);
Log.debug("Loaded user configuration: ", inputrcUrl);
}
finally {
try {
input.close();
} catch (IOException e) {
// Ignore
}
}
}
catch (IOException e) {
if (inputrcUrl.getProtocol().equals("file")) {
File file = new File(inputrcUrl.getPath());
if (file.exists()) {
Log.warn("Unable to read user configuration: ", inputrcUrl, e);
}
} else {
Log.warn("Unable to read user configuration: ", inputrcUrl, e);
}
}
}
代码示例来源:origin: com.typesafe.sbt/incremental-compiler
public void purge() throws IOException {
Log.trace("Purging history");
clear();
if (!file.delete()) {
Log.warn("Failed to delete history file: ", file);
}
}
}
代码示例来源:origin: com.typesafe.sbt/incremental-compiler
private static synchronized void runTasks() {
Log.debug("Running all shutdown-hook tasks");
// Iterate through copy of tasks list
for (Task task : tasks.toArray(new Task[tasks.size()])) {
Log.debug("Running task: ", task);
try {
task.run();
}
catch (Throwable e) {
Log.warn("Task failed", e);
}
}
tasks.clear();
}
代码示例来源:origin: OpenMods/OpenModsLib
public ContainerBucketFillHandler addFilledBucket(ItemStack filledBucket) {
FluidStack containedFluid = FluidUtil.getFluidContained(filledBucket);
if (containedFluid != null) {
buckets.add(Pair.of(containedFluid.copy(), filledBucket.copy()));
} else {
Log.warn("Item %s is not a filled bucket", filledBucket);
}
return this;
}
代码示例来源:origin: OpenMods/OpenModsLib
@Override
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
final IModel model = loadBaseModel(state, format, bakedTextureGetter);
IBlockState blockState = null;
if (defaultBlockState.isPresent()) {
final Block defaultBlock = Block.REGISTRY.getObject(defaultBlockState.get());
if (defaultBlock != Blocks.AIR) {
blockState = defaultBlock.getDefaultState();
if (!(blockState instanceof IExtendedBlockState) ||
!((IExtendedBlockState)blockState).getUnlistedNames().contains(EvalModelState.PROPERTY)) {
Log.warn("State %s does not contain eval state property", blockState);
}
} else {
Log.warn("Can't find default block: %s", defaultBlockState.get());
}
}
final IVarExpander expander = evaluatorFactory.createExpander();
return new BakedEvalExpandModel(model, state, format, bakedTextureGetter, blockState, expander);
}
代码示例来源:origin: com.typesafe.sbt/incremental-compiler
private static Properties initProperties() {
URL url = determineUrl();
Properties props = new Properties();
try {
loadProperties(url, props);
}
catch (FileNotFoundException e) {
// debug here and no stack trace, as this can happen normally if default jline.rc file is missing
Log.debug("Unable to read configuration: ", e.toString());
}
catch (IOException e) {
Log.warn("Unable to read configuration from: ", url, e);
}
return props;
}
代码示例来源:origin: com.typesafe.sbt/incremental-compiler
Log.warn("Unable to parse user configuration: ", e);
代码示例来源:origin: SleepyTrousers/EnderIO
public ITileFilterContainer getFilterContainer(MessageContext ctx) {
if (ctx.side == Side.SERVER) {
if (ctx.getServerHandler().player.openContainer instanceof ContainerFilter) {
final TileEntity tileEntity = ((ContainerFilter) ctx.getServerHandler().player.openContainer).getTileEntity();
if (tileEntity == null || !tileEntity.getPos().equals(getPos())) {
Log.warn("Player " + ctx.getServerHandler().player.getName() + " tried to manipulate a filter while another gui was open!");
return null;
} else {
if (tileEntity instanceof ITileFilterContainer) {
return (ITileFilterContainer) tileEntity;
}
}
}
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!