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


Java Log.error方法代码示例

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


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

示例1: sendAckInfoToCtrlTopic

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
private static void sendAckInfoToCtrlTopic(String dataSourceInfo, String completedTime, String pullStatus) {
    try {
        // 在源dataSourceInfo的基础上,更新全量拉取相关信息。然后发回src topic
        JSONObject jsonObj = JSONObject.parseObject(dataSourceInfo);
        jsonObj.put(DataPullConstants.FullPullInterfaceJson.FROM_KEY, DataPullConstants.FullPullInterfaceJson.FROM_VALUE);
        jsonObj.put(DataPullConstants.FullPullInterfaceJson.TYPE_KEY, DataPullConstants.FullPullInterfaceJson.TYPE_VALUE);
        // notifyFullPullRequestor
        JSONObject payloadObj = jsonObj.getJSONObject(DataPullConstants.FullPullInterfaceJson.PAYLOAD_KEY);
        // 完成时间
        payloadObj.put(DataPullConstants.FullPullInterfaceJson.COMPLETE_TIME_KEY, completedTime);
        // 拉取是否成功标志位
        payloadObj.put(DataPullConstants.FullPullInterfaceJson.DATA_STATUS_KEY, pullStatus);
        jsonObj.put(DataPullConstants.FullPullInterfaceJson.PAYLOAD_KEY, payloadObj);
        String ctrlTopic = getFullPullProperties(Constants.ZkTopoConfForFullPull.COMMON_CONFIG, true)
            .getProperty(Constants.ZkTopoConfForFullPull.FULL_PULL_SRC_TOPIC);
        Producer producer = DbusHelper
                .getProducer(getFullPullProperties(Constants.ZkTopoConfForFullPull.BYTE_PRODUCER_CONFIG, true));
        ProducerRecord record = new ProducerRecord<>(ctrlTopic, DataPullConstants.FullPullInterfaceJson.TYPE_VALUE, jsonObj.toString().getBytes());
        Future<RecordMetadata> future = producer.send(record);
        RecordMetadata meta = future.get();
    }
    catch (Exception e) {
        Log.error("Error occurred when report full data pulling status.", e);
        throw new RuntimeException(e);
    }
}
 
开发者ID:BriData,项目名称:DBus,代码行数:27,代码来源:FullPullHelper.java

示例2: processSingle

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
private void processSingle(OntModel m) {
  for (Iterator<?> i = m.listClasses(); i.hasNext(); ) {
    OntClass c = (OntClass) i.next();
    try {
      // too confusing to list all the restrictions as root classes 
      if (c.isAnon()) {
        continue;
      }

      if (c.hasSuperClass(m.getProfile().THING(), true) || c.getCardinality(m.getProfile().SUB_CLASS_OF()) == 0) {
        // this class is directly descended from Thing
        roots.add(c);
      }
    } catch (Exception e) {
      Log.error("Error during extraction or root Classes from Ontology Model: ", e);
    }
  }
}
 
开发者ID:apache,项目名称:incubator-sdap-mudrod,代码行数:19,代码来源:OwlParser.java

示例3: distResources

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
/**
 * Copy the contents of the res/ folder into the specified output.
 */
public static void distResources() {
    Log.info("FileCopier", "Copying static resources to output.");

    try {
        copyFilesOfDirTo(new File("res"), new File((Uristmaps.conf.fetch("Paths", "output"))));

        // TODO: Don't just copy _all_files, as many are not used. Especiialy the suffixed icons.
        FileUtils.copyDirectory(new File(Uristmaps.conf.fetch("Paths", "tiles"), "32"),
                new File(Uristmaps.conf.fetch("Paths", "output"), "biome_legend"));
    } catch (IOException e) {
        Log.error("FileCopier", "Failed to copy the files: " + e.getMessage());
        if (Log.DEBUG) Log.debug("FileCopier", "Exception", e);
        System.exit(1);
    }
}
 
开发者ID:dominiks,项目名称:uristmapsj,代码行数:19,代码来源:FileCopier.java

示例4: addTask

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
/**
 * Add a task to this executor.
 * Does not execute that task! Call exec(taskname) to start that task.
 * @param task
 */
public void addTask(Task task) {
    if (task.getName() == null) {
        Log.error("TaskExecutor", "Task name must not be null!");
        System.exit(1);
    }
    if (tasks.containsKey(task.getName())) {
        if (Log.DEBUG) Log.debug("TaskExecutor", "Skipped duplicate task: " + task.getName());
        return;
    }
    tasks.put(task.getName(), task);

    // Add this task to the files index
    for (File file : task.getTargetFiles()) {
        filesCreatedByTask.put(file, task.getName());
    }
}
 
开发者ID:dominiks,项目名称:uristmapsj,代码行数:22,代码来源:TaskExecutor.java

示例5: onPacketReceived

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
public boolean onPacketReceived(Connection connection, Object packet) {
    Iterator<Class> it = mPackets.keySet().iterator();
    
    while (it.hasNext()) {
        Class item = it.next();
        try {
            if (packet.getClass().isAssignableFrom(item)) {
                PacketAction a = mPackets.get(item);
                AccountConnection c = (AccountConnection)connection;
                if (!a.needLoggedIn() || (c.getToken() != null && c.getToken().length() > 0)) {
                    a.run(c, packet);
                } else {
                    ErrorPacket p = new ErrorPacket();
                    p.message = "You are not authenticated.";
                    p.status = ErrorType.NOT_AUTHENTICATED;
                    c.sendTCP(p);
                    c.close();
                }
                return true;
            }
        } catch (Exception e) {
            Log.error("PacketInterpretator", e);
        }
    }
    return false;
}
 
开发者ID:AlexMog,项目名称:MMO-Rulemasters-World,代码行数:27,代码来源:PacketsInterpretator.java

示例6: createProgressZkNode

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
public static void createProgressZkNode(ZkService zkService, DBConfiguration dbConf) {
    String dbName = (String)(dbConf.getConfProperties().get(DBConfiguration.DataSourceInfo.DB_NAME));
    String dbSchema = (String)(dbConf.getConfProperties().get(DBConfiguration.DataSourceInfo.DB_SCHEMA));
    String tableName = (String)(dbConf.getConfProperties().get(DBConfiguration.DataSourceInfo.TABLE_NAME));
    String zkPath;
    try {
        zkPath = zkMonitorRootNodePath;
        if(!zkService.isExists(zkPath)){
            zkService.createNode(zkPath, null);
        }
        zkPath = buildZkPath(zkMonitorRootNodePath, dbName);
        if(!zkService.isExists(zkPath)){
            zkService.createNode(zkPath, null);
        }
        zkPath = buildZkPath(zkMonitorRootNodePath, dbName + "/" + dbSchema);
        if(!zkService.isExists(zkPath)){
            zkService.createNode(zkPath, null);
        }
        zkPath = buildZkPath(zkMonitorRootNodePath, dbName+ "/" + dbSchema + "/" + tableName);
        if(!zkService.isExists(zkPath)){
            zkService.createNode(zkPath, null);
        }
    } catch (Exception e) {
        Log.error("create parent node failed exception!", e);
        throw new RuntimeException(e);
    }
}
 
开发者ID:BriData,项目名称:DBus,代码行数:28,代码来源:FullPullHelper.java

示例7: getPixmapColor

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
private static int getPixmapColor (Pixmap pixmap){
    int color = 0;
    try {
        Field colorField = ClassReflection.getDeclaredField(Pixmap.class, "color");
        colorField.setAccessible(true);
        color = (Integer)colorField.get(pixmap);
    } catch (ReflectionException e) {
        Log.error("Color field of pixmap could not be read. Using transparent black.", e);
    }
    return color;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:12,代码来源:PixmapSerializer.java

示例8: build

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
public ItemLootInfo build()
{
	if(itemLootInfo.itemIdentifier == null)
		Log.error("Item identifier was not set!");
	if(itemLootInfo.chancesOfDropping == 0)
		Log.warn("Chances of dropping item was not set, default 0");
	if(itemLootInfo.itemNumberRange == null)
		Log.error("ItemNumberRange was not set!");
			
	return itemLootInfo;
}
 
开发者ID:MMORPG-Prototype,项目名称:MMORPG_Prototype,代码行数:12,代码来源:ItemLootInfo.java

示例9: main

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
public static void main(String[] args) {  
  try {
    new NetworkServer();
  } catch (IOException e) {
    Log.error(e.getMessage());
  }
}
 
开发者ID:Pheelbert,项目名称:chatterino,代码行数:8,代码来源:Main.java

示例10: getTilesetImage

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
/**
 * Load the image data for the tileset of the given level.
 * @param level
 * @return
 */
public static BufferedImage getTilesetImage(int level) {
    try {
        return ImageIO.read(BuildFiles.getTilesetImage(level));
    } catch (IOException e) {
        Log.error("Tilesets", "Could not read tileset image file: " + BuildFiles.getTilesetImage(level));
        if (Log.DEBUG) Log.debug("Tilesets", "Exception", e);
        System.exit(1);
    }
    return null;
}
 
开发者ID:dominiks,项目名称:uristmapsj,代码行数:16,代码来源:Tilesets.java

示例11: printMatrixInListOfListsFormat

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
/**
 * Writes the matrix in a List of lists (LIL) format
 */
public static void printMatrixInListOfListsFormat(org.apache.spark.mllib.linalg.Matrix m, String outputPath) {
	try
	{
		FileWriter fileWriter = new FileWriter(outputPath);
		PrintWriter printWriter= new PrintWriter(fileWriter);
		boolean firstValue=true;
		double val;
		for(int i=0; i < m.numRows(); i++)
		{
			printWriter.print("{");
			for(int j=0; j < m.numCols(); j++)
			{
				val=m.apply(i, j);
				if(val!=0)
					if(firstValue)
					{
						printWriter.print(j + ":" + val);
					    firstValue=false;
					}
					else
						printWriter.print("," + j + ":" + val);
			}
			printWriter.print("}");
			printWriter.println();
			firstValue=true;
		}
		printWriter.close();
		fileWriter.close();
	}
	catch (Exception e) {
		Log.error("Output file " + outputPath + " not found ");
	}
}
 
开发者ID:SiddharthMalhotra,项目名称:sPCA,代码行数:37,代码来源:PCAUtils.java

示例12: loadWorldSize

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
/**
 * Load the biome map and check its px size for world unit-size.
 */
private static void loadWorldSize() {
    Log.debug("WorldInfo", "Importing world size from biome");

    try {
        BufferedImage image = ImageIO.read(ExportFiles.getBiomeMap());
        data.put("size", image.getWidth() + "");
    } catch (IOException e) {
        Log.error("WorldInfo", "Could not read biome image file.");
        if (Log.DEBUG) Log.debug("WorldInfo", "Exception", e);
        System.exit(1);
    }
}
 
开发者ID:dominiks,项目名称:uristmapsj,代码行数:16,代码来源:WorldInfo.java

示例13: updateServer

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
public void updateServer() {
    try {
        UpdateServerSnd st = new UpdateServerSnd(this.id);
        ClientResponse response = this.getClientResponse(st, "update_last_active");
        UpdateServerRcv output = response.getEntity(UpdateServerRcv.class);
        if (!output.getRes()) {
            Log.error("Master server error: " + output.getErr());
        } else {
            Log.info("Sent alive signal to data server.");
        }
    } catch (Exception e) {
        Log.error("Master: " + e.getMessage());
        e.printStackTrace();
    }
}
 
开发者ID:LeNiglo,项目名称:TinyTank,代码行数:16,代码来源:DataServer.java

示例14: stopServer

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
public void stopServer() {
    try {
        updateThread.shutdown();
        StopServerSnd st = new StopServerSnd(this.id);
        ClientResponse response = this.getClientResponse(st, "stop_server");
        StopServerRcv output = response.getEntity(StopServerRcv.class);
        if (!output.getRes()) {
            Log.error("Master server error: " + output.getErr());
        }
    } catch (Exception e) {
        Log.error("Master: " + e.getMessage());
        e.printStackTrace();
    }
}
 
开发者ID:LeNiglo,项目名称:TinyTank,代码行数:15,代码来源:DataServer.java

示例15: addUser

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
public void addUser(String pseudo) {
    try {
        AddUserSnd st = new AddUserSnd(this.id, pseudo);
        ClientResponse response = this.getClientResponse(st, "add_user");
        AddUserRcv output = response.getEntity(AddUserRcv.class);
        if (!output.getRes()) {
            Log.error("Master server error: " + output.getErr());
        }
    } catch (Exception e) {
        Log.error("Master: " + e.getMessage());
        e.printStackTrace();
    }
}
 
开发者ID:LeNiglo,项目名称:TinyTank,代码行数:14,代码来源:DataServer.java


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