Creating a Log File?

Discussion in 'Plugin Development' started by xxCoderForLifexx, Feb 12, 2013.

Thread Status:
Not open for further replies.
  1. How would I make a log file so the actions go in to the file?
     
  2. Offline

    teunie75

    Code:
    File file = new File(getDataFolder, "<filename>.yml");
    if(!file.exists()){
    try {
                    file.createNewFile();
                    logger.info("File " + file.getName()+ " created!");
                }catch (IOException e){
                    logger.severe("Error, could not create " + file.getName());
                }
     
  3. Offline

    Sagacious_Zed Bukkit Docs

Thread Status:
Not open for further replies.

Share This Page