Added Server.getLogger, changed a few anonymous loggers to use it

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot
2011-02-20 02:24:47 +00:00
parent e3b86cda50
commit f398397845
4 changed files with 16 additions and 10 deletions

View File

@ -93,9 +93,9 @@ public final class SimplePluginManager implements PluginManager {
try {
plugin = loadPlugin(file);
} catch (InvalidPluginException ex) {
Logger.getLogger(SimplePluginManager.class.getName()).log(Level.SEVERE, "Could not load " + file.getPath() + " in " + directory.getPath() + ": " + ex.getMessage(), ex);
server.getLogger().log(Level.SEVERE, "Could not load " + file.getPath() + " in " + directory.getPath() + ": " + ex.getMessage(), ex);
} catch (InvalidDescriptionException ex) {
Logger.getLogger(SimplePluginManager.class.getName()).log(Level.SEVERE, "Could not load " + file.getPath() + " in " + directory.getPath() + ": " + ex.getMessage(), ex);
server.getLogger().log(Level.SEVERE, "Could not load " + file.getPath() + " in " + directory.getPath() + ": " + ex.getMessage(), ex);
}
if (plugin != null) {
@ -224,7 +224,7 @@ public final class SimplePluginManager implements PluginManager {
try {
registration.callEvent( event );
} catch (Throwable ex) {
Logger.getLogger(SimplePluginManager.class.getName()).log(Level.SEVERE, "Could not pass event " + event.getType() + " to " + registration.getPlugin().getDescription().getName(), ex);
server.getLogger().log(Level.SEVERE, "Could not pass event " + event.getType() + " to " + registration.getPlugin().getDescription().getName(), ex);
}
}
}