CustomLogAPI

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

Usin this API will allow you to Create your own custom log files and write to them using the generic logger statements.

Current Features:

  • Create '.log' files
  • Takes any string as an input
  • Optional GUI

The GUI allows other plugins to display a visual update of what is being entered into the log file.

How To Use The API:

1) Add the API file you your build path

2) I plugin.yml, make a dependency (can be soft-depend) for "CustomLogAPI"

depend: [CustomLogAPI]

3) Call the constructor in your plugin:

CustomLogAPI api = new CustomLogAPI(plugin, filename, boolean);

plugin = instance of your main plugin file

filename = the name of the log file you want (do not include the extension as the API automatically uses '.log')

boolean = true/false to display the GUI screen (server side only)

4) Log messages: There is two ways to log a message:

  • INFO
  • WARNING

The format of the message in the log file follows the same format as the craftbukkit logger. Heres how to add the messages:

api.Info("Info Message");
api.Warning("Warning Message");

5) Close the GUI: If you use the GUI this is a MUST!!! This should be placed in your "onDisable()" function to make sure that when the server restarts/closes the windows close. Otherwise you will get multiple instances of the logger.

api.closeLogDisplay();

This is recommended BUT depending on your plugin it may not be needed.

If you do not follow these instructions, I will not take responsibility if this breaks your plugin/server.


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    69233
  • Created
    Nov 18, 2013
  • Last Released File
    Never
  • Total Downloads
    260
  • License

Categories

Members

Recent Files