浏览代码

BETA: Getting rid of printStackTrace()
* Continued [4187] and [4184]

Zoey76 13 年之前
父节点
当前提交
59bdac0880
共有 28 个文件被更改,包括 121 次插入90 次删除
  1. 26 26
      L2J_Server_BETA/java/com/l2jserver/Config.java
  2. 2 5
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/MultiSell.java
  3. 0 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/CHSiegeManager.java
  4. 5 2
      L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/HandysBlockCheckerManager.java
  5. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/HellboundManager.java
  6. 0 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/MapRegionManager.java
  7. 2 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/BlockCheckerEngine.java
  8. 2 2
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/L2Event.java
  9. 3 6
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/clanhall/ClanHallSiegeEngine.java
  10. 3 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/quest/Quest.java
  11. 5 0
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/zone/type/L2PeaceZone.java
  12. 14 7
      L2J_Server_BETA/java/com/l2jserver/gameserver/script/ScriptDocument.java
  13. 5 2
      L2J_Server_BETA/java/com/l2jserver/gameserver/script/ScriptPackage.java
  14. 1 1
      L2J_Server_BETA/java/com/l2jserver/loginserver/FloodProtectedListener.java
  15. 2 1
      L2J_Server_BETA/java/com/l2jserver/loginserver/GameServerTable.java
  16. 1 1
      L2J_Server_BETA/java/com/l2jserver/loginserver/GameServerThread.java
  17. 4 4
      L2J_Server_BETA/java/com/l2jserver/loginserver/L2LoginServer.java
  18. 1 1
      L2J_Server_BETA/java/com/l2jserver/loginserver/mail/BaseMail.java
  19. 3 3
      L2J_Server_BETA/java/com/l2jserver/loginserver/network/L2LoginClient.java
  20. 8 3
      L2J_Server_BETA/java/com/l2jserver/loginserver/network/gameserverpackets/RequestTempBan.java
  21. 4 1
      L2J_Server_BETA/java/com/l2jserver/loginserver/network/serverpackets/ServerList.java
  22. 4 1
      L2J_Server_BETA/java/com/l2jserver/status/GameStatusThread.java
  23. 1 1
      L2J_Server_BETA/java/com/l2jserver/status/LoginStatusThread.java
  24. 2 2
      L2J_Server_BETA/java/com/l2jserver/status/Status.java
  25. 5 4
      L2J_Server_BETA/java/com/l2jserver/util/Base64.java
  26. 6 6
      L2J_Server_BETA/java/com/l2jserver/util/Util.java
  27. 5 1
      L2J_Server_BETA/java/com/l2jserver/util/network/BaseRecievePacket.java
  28. 6 3
      L2J_Server_BETA/java/com/l2jserver/util/network/BaseSendablePacket.java

+ 26 - 26
L2J_Server_BETA/java/com/l2jserver/Config.java

@@ -1192,7 +1192,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+CONFIGURATION_FILE+" File.");
 					throw new Error("Failed to Load "+CONFIGURATION_FILE+" File.");
 				}
 				}
 				
 				
@@ -1252,7 +1252,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+IP_CONFIG_FILE+" File.");
 					throw new Error("Failed to Load "+IP_CONFIG_FILE+" File.");
 				}
 				}
 				
 				
@@ -1270,7 +1270,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+COMMUNITY_CONFIGURATION_FILE+" File.");
 					throw new Error("Failed to Load "+COMMUNITY_CONFIGURATION_FILE+" File.");
 				}
 				}
 				
 				
@@ -1489,7 +1489,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+FEATURE_CONFIG_FILE+" File.");
 					throw new Error("Failed to Load "+FEATURE_CONFIG_FILE+" File.");
 				}
 				}
 				
 				
@@ -1753,7 +1753,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+CHARACTER_CONFIG_FILE+" file.");
 					throw new Error("Failed to Load "+CHARACTER_CONFIG_FILE+" file.");
 				}
 				}
 				
 				
@@ -1800,7 +1800,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+TELNET_FILE+" File.");
 					throw new Error("Failed to Load "+TELNET_FILE+" File.");
 				}
 				}
 				
 				
@@ -1819,7 +1819,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load " + MMO_CONFIG_FILE + " File.");
 					throw new Error("Failed to Load " + MMO_CONFIG_FILE + " File.");
 				}
 				}
 				
 				
@@ -1837,7 +1837,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+ID_CONFIG_FILE+" file.");
 					throw new Error("Failed to Load "+ID_CONFIG_FILE+" file.");
 				}
 				}
 				
 				
@@ -2088,7 +2088,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+GENERAL_CONFIG_FILE+" File.");
 					throw new Error("Failed to Load "+GENERAL_CONFIG_FILE+" File.");
 				}
 				}
 				
 				
@@ -2103,7 +2103,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+FLOOD_PROTECTOR_FILE);
 					throw new Error("Failed to Load "+FLOOD_PROTECTOR_FILE);
 				}
 				}
 				
 				
@@ -2199,7 +2199,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+NPC_CONFIG_FILE+" File.");
 					throw new Error("Failed to Load "+NPC_CONFIG_FILE+" File.");
 				}
 				}
 				
 				
@@ -2294,7 +2294,7 @@ public final class Config
 					catch (Exception e)
 					catch (Exception e)
 					{
 					{
 						_log.warning("Error while loading Player XP percent lost");
 						_log.warning("Error while loading Player XP percent lost");
-						e.printStackTrace();
+						_log.warning("Config: " + e.getMessage());
 					}
 					}
 					
 					
 					String[] propertySplit = ratesSettings.getProperty("RateDropItemsById", "").split(";");
 					String[] propertySplit = ratesSettings.getProperty("RateDropItemsById", "").split(";");
@@ -2327,7 +2327,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+RATES_CONFIG_FILE+" File.");
 					throw new Error("Failed to Load "+RATES_CONFIG_FILE+" File.");
 				}
 				}
 				
 				
@@ -2649,7 +2649,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+L2JMOD_CONFIG_FILE+" File.");
 					throw new Error("Failed to Load "+L2JMOD_CONFIG_FILE+" File.");
 				}
 				}
 				
 				
@@ -2692,7 +2692,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+PVP_CONFIG_FILE+" File.");
 					throw new Error("Failed to Load "+PVP_CONFIG_FILE+" File.");
 				}
 				}
 				// Load Olympiad L2Properties file (if exists)
 				// Load Olympiad L2Properties file (if exists)
@@ -2747,7 +2747,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+OLYMPIAD_CONFIG_FILE+" File.");
 					throw new Error("Failed to Load "+OLYMPIAD_CONFIG_FILE+" File.");
 				}
 				}
 				try
 				try
@@ -2864,7 +2864,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load " + GRANDBOSS_CONFIG_FILE + " File.");
 					throw new Error("Failed to Load " + GRANDBOSS_CONFIG_FILE + " File.");
 				}
 				}
 				
 				
@@ -2882,7 +2882,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load " + GRACIASEEDS_CONFIG_FILE + " File.");
 					throw new Error("Failed to Load " + GRACIASEEDS_CONFIG_FILE + " File.");
 				}
 				}
 				
 				
@@ -2902,7 +2902,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load " + CHAT_FILTER_FILE + " File.");
 					throw new Error("Failed to Load " + CHAT_FILTER_FILE + " File.");
 				}
 				}
 				
 				
@@ -2921,7 +2921,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load " + SECURITY_CONFIG_FILE + " File.");
 					throw new Error("Failed to Load " + SECURITY_CONFIG_FILE + " File.");
 				}
 				}
 				try
 				try
@@ -2939,7 +2939,7 @@ public final class Config
 				}
 				}
 				catch(Exception e)
 				catch(Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 				}
 				}
 			}
 			}
 			finally
 			finally
@@ -3003,7 +3003,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load " + LOGIN_CONFIGURATION_FILE + " File.");
 					throw new Error("Failed to Load " + LOGIN_CONFIGURATION_FILE + " File.");
 				}
 				}
 				// MMO
 				// MMO
@@ -3021,7 +3021,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load " + MMO_CONFIG_FILE + " File.");
 					throw new Error("Failed to Load " + MMO_CONFIG_FILE + " File.");
 				}
 				}
 				
 				
@@ -3036,7 +3036,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load "+TELNET_FILE+" File.");
 					throw new Error("Failed to Load "+TELNET_FILE+" File.");
 				}
 				}
 				
 				
@@ -3064,7 +3064,7 @@ public final class Config
 				}
 				}
 				catch (Exception e)
 				catch (Exception e)
 				{
 				{
-					e.printStackTrace();
+					_log.warning("Config: " + e.getMessage());
 					throw new Error("Failed to Load " + EMAIL_CONFIG_FILE + " File.");
 					throw new Error("Failed to Load " + EMAIL_CONFIG_FILE + " File.");
 				}
 				}
 			}
 			}
@@ -3511,7 +3511,7 @@ public final class Config
 		catch (Exception e)
 		catch (Exception e)
 		{
 		{
 			_log.warning(StringUtil.concat("Failed to save hex id to ", fileName, " File."));
 			_log.warning(StringUtil.concat("Failed to save hex id to ", fileName, " File."));
-			e.printStackTrace();
+			_log.warning("Config: " + e.getMessage());
 		}
 		}
 	}
 	}
 	
 	

+ 2 - 5
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/MultiSell.java

@@ -286,18 +286,15 @@ public class MultiSell
 						}
 						}
 						catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException | DOMException e1)
 						catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException | DOMException e1)
 						{
 						{
-							_log.warning(e.getLocalizedMessage() + doc.getLocalName());
+							_log.warning(e.getMessage() + doc.getLocalName());
 							list.setUseRate(1.0);
 							list.setUseRate(1.0);
-							e.printStackTrace();
 						}
 						}
 
 
 					}
 					}
 					catch (DOMException e) 
 					catch (DOMException e) 
 					{
 					{
-						_log.warning(e.getLocalizedMessage() + doc.getLocalName());
-						e.printStackTrace();
+						_log.warning(e.getMessage() + doc.getLocalName());
 					}
 					}
-					
 				}
 				}
 				
 				
 				attribute = n.getAttributes().getNamedItem("maintainEnchantment");
 				attribute = n.getAttributes().getNamedItem("maintainEnchantment");

+ 0 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/CHSiegeManager.java

@@ -96,7 +96,6 @@ public final class CHSiegeManager
 		catch(Exception e)
 		catch(Exception e)
 		{
 		{
 			_log.warning("CHSiegeManager: Could not load siegable clan halls!:");
 			_log.warning("CHSiegeManager: Could not load siegable clan halls!:");
-			e.printStackTrace();
 		}
 		}
 		finally
 		finally
 		{
 		{

+ 5 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/HandysBlockCheckerManager.java

@@ -18,6 +18,7 @@ import gnu.trove.map.hash.TIntIntHashMap;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
+import java.util.logging.Logger;
 
 
 import javolution.util.FastList;
 import javolution.util.FastList;
 import javolution.util.FastMap;
 import javolution.util.FastMap;
@@ -45,7 +46,9 @@ import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
  */
  */
 public final class HandysBlockCheckerManager 
 public final class HandysBlockCheckerManager 
 {
 {
-	// All the participants and their team classifed by arena
+	private static final Logger _log = Logger.getLogger(HandysBlockCheckerManager.class.getName());
+	
+	// All the participants and their team classified by arena
 	private static ArenaParticipantsHolder[] _arenaPlayers = new ArenaParticipantsHolder[4];
 	private static ArenaParticipantsHolder[] _arenaPlayers = new ArenaParticipantsHolder[4];
 	
 	
 	// Arena votes to start the game
 	// Arena votes to start the game
@@ -511,7 +514,7 @@ public final class HandysBlockCheckerManager
 			}
 			}
 			catch(Exception e)
 			catch(Exception e)
 			{
 			{
-				e.printStackTrace();
+				_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 			}
 			}
 		}
 		}
 	}
 	}

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/HellboundManager.java

@@ -212,7 +212,7 @@ public class HellboundManager
 			}
 			}
 			catch (Exception e)
 			catch (Exception e)
 			{
 			{
-				e.printStackTrace();
+				_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 			}
 			}
 		}
 		}
 		
 		

+ 0 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/MapRegionManager.java

@@ -83,7 +83,6 @@ public class MapRegionManager
 		}
 		}
 		catch (Exception e)
 		catch (Exception e)
 		{
 		{
-			e.printStackTrace();
 			_log.log(Level.SEVERE, "Failed loading MapRegion", e);
 			_log.log(Level.SEVERE, "Failed loading MapRegion", e);
 		}
 		}
 	}
 	}

+ 2 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/BlockCheckerEngine.java

@@ -458,7 +458,7 @@ public final class BlockCheckerEngine
 			}
 			}
 			catch(Exception e)
 			catch(Exception e)
 			{
 			{
-				e.printStackTrace();
+				_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 			}
 			}
 			
 			
 			// Spawn the block carrying girl
 			// Spawn the block carrying girl
@@ -482,8 +482,7 @@ public final class BlockCheckerEngine
 				catch(Exception e) 
 				catch(Exception e) 
 				{
 				{
 					_log.warning("Couldnt Spawn Block Checker NPCs! Wrong instance type at npc table?");
 					_log.warning("Couldnt Spawn Block Checker NPCs! Wrong instance type at npc table?");
-					if(Config.DEBUG) 
-						e.printStackTrace(); 
+					_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 				}
 				}
 			}
 			}
 			
 			

+ 2 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/L2Event.java

@@ -391,7 +391,7 @@ public class L2Event
 		}
 		}
 		catch (Exception e)
 		catch (Exception e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning("L2Event: " + e.getMessage());
 			return "Cannot start event participation, an error has occured.";
 			return "Cannot start event participation, an error has occured.";
 		}
 		}
 		
 		
@@ -459,7 +459,7 @@ public class L2Event
 		}
 		}
 		catch (Exception e)
 		catch (Exception e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning("L2Event: " + e.getMessage());
 			return "Cannot start event, an error has occured.";
 			return "Cannot start event, an error has occured.";
 		}
 		}
 		
 		

+ 3 - 6
L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/clanhall/ClanHallSiegeEngine.java

@@ -109,8 +109,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
 		}
 		}
 		catch(Exception e)
 		catch(Exception e)
 		{
 		{
-			_log.warning(getName()+": Could not load siege attackers!:");
-			e.printStackTrace();
+			_log.warning(getName() + ": Could not load siege attackers!:");
 		}
 		}
 		finally
 		finally
 		{
 		{
@@ -145,8 +144,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
 		}
 		}
 		catch(Exception e)
 		catch(Exception e)
 		{
 		{
-			_log.warning(getName()+": Couldnt save attacker list!");
-			e.printStackTrace();
+			_log.warning(getName() + ": Couldnt save attacker list!");
 		}
 		}
 		finally
 		finally
 		{
 		{
@@ -185,8 +183,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
 			}
 			}
 			catch(Exception e)
 			catch(Exception e)
 			{
 			{
-				_log.warning(getName()+": Couldnt load siege guards!:");
-				e.printStackTrace();
+				_log.warning(getName() + ": Couldnt load siege guards!:");
 			}
 			}
 			finally
 			finally
 			{
 			{

+ 3 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/quest/Quest.java

@@ -834,7 +834,9 @@ public class Quest extends ManagedScript
 	{
 	{
 		_log.log(Level.WARNING, this.getScriptFile().getAbsolutePath(), t);
 		_log.log(Level.WARNING, this.getScriptFile().getAbsolutePath(), t);
 		if (t.getMessage() == null)
 		if (t.getMessage() == null)
-			t.printStackTrace();
+		{
+			_log.warning(getClass().getSimpleName() + ": " + t.getMessage());
+		}
 		if (player != null && player.getAccessLevel().isGm())
 		if (player != null && player.getAccessLevel().isGm())
 		{
 		{
 			String res = "<html><body><title>Script error</title>" + Util.getStackTrace(t) + "</body></html>";
 			String res = "<html><body><title>Script error</title>" + Util.getStackTrace(t) + "</body></html>";

+ 5 - 0
L2J_Server_BETA/java/com/l2jserver/gameserver/model/zone/type/L2PeaceZone.java

@@ -47,6 +47,11 @@ public class L2PeaceZone extends L2ZoneType
 			{
 			{
 				return;
 				return;
 			}
 			}
+			
+			if (!getAllowStore())
+			{
+				character.setInsideZone(L2Character.ZONE_NOSTORE, true);
+			}
 		}
 		}
 		
 		
 		if (Config.PEACE_ZONE_MODE != 2)
 		if (Config.PEACE_ZONE_MODE != 2)

+ 14 - 7
L2J_Server_BETA/java/com/l2jserver/gameserver/script/ScriptDocument.java

@@ -27,12 +27,12 @@ import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXException;
 
 
 /**
 /**
- *
  *
  *
  */
  */
 public class ScriptDocument
 public class ScriptDocument
 {
 {
-	protected static final Logger _log = Logger.getLogger(ScriptDocument.class.getName());
+	private static final Logger _log = Logger.getLogger(ScriptDocument.class.getName());
+	
 	private Document _document;
 	private Document _document;
 	private String _name;
 	private String _name;
 	
 	
@@ -46,18 +46,25 @@ public class ScriptDocument
 			DocumentBuilder builder = factory.newDocumentBuilder();
 			DocumentBuilder builder = factory.newDocumentBuilder();
 			_document = builder.parse( input );
 			_document = builder.parse( input );
 			
 			
-		} catch (SAXException sxe) {
+		}
+		catch (SAXException sxe)
+		{
 			// Error generated during parsing)
 			// Error generated during parsing)
 			Exception  x = sxe;
 			Exception  x = sxe;
 			if (sxe.getException() != null)
 			if (sxe.getException() != null)
+			{
 				x = sxe.getException();
 				x = sxe.getException();
-			x.printStackTrace();
-			
-		} catch (ParserConfigurationException pce) {
+			}
+			_log.warning(getClass().getSimpleName() + ": " + x.getMessage());
+		}
+		catch (ParserConfigurationException pce)
+		{
 			// Parser with specified options can't be built
 			// Parser with specified options can't be built
 			_log.log(Level.WARNING, "", pce);
 			_log.log(Level.WARNING, "", pce);
 			
 			
-		} catch (IOException ioe) {
+		}
+		catch (IOException ioe)
+		{
 			// I/O error
 			// I/O error
 			_log.log(Level.WARNING, "", ioe);
 			_log.log(Level.WARNING, "", ioe);
 		}
 		}

+ 5 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/script/ScriptPackage.java

@@ -17,6 +17,7 @@ package com.l2jserver.gameserver.script;
 import java.io.IOException;
 import java.io.IOException;
 import java.util.Enumeration;
 import java.util.Enumeration;
 import java.util.List;
 import java.util.List;
+import java.util.logging.Logger;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import java.util.zip.ZipFile;
 
 
@@ -27,6 +28,8 @@ import javolution.util.FastList;
  */
  */
 public class ScriptPackage
 public class ScriptPackage
 {
 {
+	private static final Logger _log = Logger.getLogger(ScriptPackage.class.getName());
+	
 	private List<ScriptDocument> _scriptFiles;
 	private List<ScriptDocument> _scriptFiles;
 	private List<String> _otherFiles;
 	private List<String> _otherFiles;
 	private String _name;
 	private String _name;
@@ -70,9 +73,9 @@ public class ScriptPackage
 					ScriptDocument newScript = new ScriptDocument(entry.getName(), pack.getInputStream(entry));
 					ScriptDocument newScript = new ScriptDocument(entry.getName(), pack.getInputStream(entry));
 					_scriptFiles.add(newScript);
 					_scriptFiles.add(newScript);
 				}
 				}
-				catch (IOException e1)
+				catch (IOException io)
 				{
 				{
-					e1.printStackTrace();
+					_log.warning(getClass().getSimpleName() + ": " + io.getMessage());
 				}
 				}
 			}
 			}
 			else if (!entry.isDirectory())
 			else if (!entry.isDirectory())

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/loginserver/FloodProtectedListener.java

@@ -158,7 +158,7 @@ public abstract class FloodProtectedListener extends Thread
 		}
 		}
 		catch (IOException e)
 		catch (IOException e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 		}
 		}
 	}
 	}
 }
 }

+ 2 - 1
L2J_Server_BETA/java/com/l2jserver/loginserver/GameServerTable.java

@@ -140,7 +140,7 @@ public class GameServerTable
 		}
 		}
 		catch (XMLStreamException xppe)
 		catch (XMLStreamException xppe)
 		{
 		{
-			xppe.printStackTrace();
+			_log.warning(getClass().getSimpleName() + ": " + xppe.getMessage());
 		}
 		}
 		finally
 		finally
 		{
 		{
@@ -150,6 +150,7 @@ public class GameServerTable
 			}
 			}
 			catch (Exception e)
 			catch (Exception e)
 			{
 			{
+				_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 			}
 			}
 		}
 		}
 	}
 	}

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/loginserver/GameServerThread.java

@@ -214,7 +214,7 @@ public class GameServerThread extends Thread
 		}
 		}
 		catch (IOException e)
 		catch (IOException e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 		}
 		}
 		KeyPair pair = GameServerTable.getInstance().getKeyPair();
 		KeyPair pair = GameServerTable.getInstance().getKeyPair();
 		_privateKey = (RSAPrivateKey) pair.getPrivate();
 		_privateKey = (RSAPrivateKey) pair.getPrivate();

+ 4 - 4
L2J_Server_BETA/java/com/l2jserver/loginserver/L2LoginServer.java

@@ -46,10 +46,10 @@ import com.l2jserver.status.Status;
  */
  */
 public class L2LoginServer
 public class L2LoginServer
 {
 {
-	public static final int PROTOCOL_REV = 0x0106;
+	private final Logger _log = Logger.getLogger(L2LoginServer.class.getName());
 	
 	
+	public static final int PROTOCOL_REV = 0x0106;
 	private static L2LoginServer _instance;
 	private static L2LoginServer _instance;
-	private final Logger _log = Logger.getLogger(L2LoginServer.class.getName());
 	private GameServerListener _gameServerListener;
 	private GameServerListener _gameServerListener;
 	private SelectorThread<L2LoginClient> _selectorThread;
 	private SelectorThread<L2LoginClient> _selectorThread;
 	private Status _statusServer;
 	private Status _statusServer;
@@ -87,7 +87,7 @@ public class L2LoginServer
 		}
 		}
 		catch (IOException e)
 		catch (IOException e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 		}
 		}
 		finally
 		finally
 		{
 		{
@@ -100,7 +100,7 @@ public class L2LoginServer
 			}
 			}
 			catch (IOException e)
 			catch (IOException e)
 			{
 			{
-				e.printStackTrace();
+				_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 			}
 			}
 		}
 		}
 		
 		

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/loginserver/mail/BaseMail.java

@@ -102,7 +102,7 @@ public class BaseMail implements Runnable
 		}
 		}
 		catch (MessagingException e)
 		catch (MessagingException e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 		}
 		}
 	}
 	}
 	
 	

+ 3 - 3
L2J_Server_BETA/java/com/l2jserver/loginserver/network/L2LoginClient.java

@@ -95,8 +95,8 @@ public final class L2LoginClient extends MMOClient<MMOConnection<L2LoginClient>>
 		}
 		}
 		catch (IOException e)
 		catch (IOException e)
 		{
 		{
-			e.printStackTrace();
-			super.getConnection().close((SendablePacket<L2LoginClient>)null);
+			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
+			super.getConnection().close((SendablePacket<L2LoginClient>) null);
 			return false;
 			return false;
 		}
 		}
 		
 		
@@ -124,7 +124,7 @@ public final class L2LoginClient extends MMOClient<MMOConnection<L2LoginClient>>
 		}
 		}
 		catch (IOException e)
 		catch (IOException e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 			return false;
 			return false;
 		}
 		}
 		
 		

+ 8 - 3
L2J_Server_BETA/java/com/l2jserver/loginserver/network/gameserverpackets/RequestTempBan.java

@@ -18,18 +18,23 @@ import java.net.UnknownHostException;
 import java.sql.Connection;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.sql.SQLException;
+import java.util.logging.Logger;
 
 
 import com.l2jserver.L2DatabaseFactory;
 import com.l2jserver.L2DatabaseFactory;
 import com.l2jserver.loginserver.LoginController;
 import com.l2jserver.loginserver.LoginController;
 import com.l2jserver.util.network.BaseRecievePacket;
 import com.l2jserver.util.network.BaseRecievePacket;
 
 
 /**
 /**
- * 
  * @author mrTJO
  * @author mrTJO
  */
  */
 public class RequestTempBan extends BaseRecievePacket
 public class RequestTempBan extends BaseRecievePacket
 {
 {
-	String _accountName, _banReason, _ip;
+	private static final Logger _log = Logger.getLogger(RequestTempBan.class.getName());
+	
+	private final String _accountName;
+	@SuppressWarnings("unused")
+	private String _banReason;
+	private String _ip;
 	long _banTime;
 	long _banTime;
 	
 	
 	/**
 	/**
@@ -65,7 +70,7 @@ public class RequestTempBan extends BaseRecievePacket
 		}
 		}
 		catch (SQLException e)
 		catch (SQLException e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 		}
 		}
 		finally
 		finally
 		{
 		{

+ 4 - 1
L2J_Server_BETA/java/com/l2jserver/loginserver/network/serverpackets/ServerList.java

@@ -19,6 +19,7 @@ import java.net.UnknownHostException;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
+import java.util.logging.Logger;
 
 
 import com.l2jserver.loginserver.GameServerTable;
 import com.l2jserver.loginserver.GameServerTable;
 import com.l2jserver.loginserver.GameServerTable.GameServerInfo;
 import com.l2jserver.loginserver.GameServerTable.GameServerInfo;
@@ -52,6 +53,8 @@ import com.l2jserver.loginserver.network.gameserverpackets.ServerStatus;
  */
  */
 public final class ServerList extends L2LoginServerPacket
 public final class ServerList extends L2LoginServerPacket
 {
 {
+	private static final Logger _log = Logger.getLogger(ServerList.class.getName());
+	
 	private List<ServerData> _servers;
 	private List<ServerData> _servers;
 	private int _lastServer;
 	private int _lastServer;
 	private Map<Integer, Integer> _charsOnServers;
 	private Map<Integer, Integer> _charsOnServers;
@@ -79,7 +82,7 @@ public final class ServerList extends L2LoginServerPacket
 			}
 			}
 			catch (UnknownHostException e)
 			catch (UnknownHostException e)
 			{
 			{
-				e.printStackTrace();
+				_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 				_ip = new byte[4];
 				_ip = new byte[4];
 				_ip[0] = 127;
 				_ip[0] = 127;
 				_ip[1] = 0;
 				_ip[1] = 0;

+ 4 - 1
L2J_Server_BETA/java/com/l2jserver/status/GameStatusThread.java

@@ -24,6 +24,7 @@ import java.io.PrintWriter;
 import java.net.InetAddress;
 import java.net.InetAddress;
 import java.net.Socket;
 import java.net.Socket;
 import java.util.Properties;
 import java.util.Properties;
+import java.util.logging.Logger;
 
 
 import com.l2jserver.Config;
 import com.l2jserver.Config;
 import com.l2jserver.gameserver.handler.ITelnetHandler;
 import com.l2jserver.gameserver.handler.ITelnetHandler;
@@ -31,6 +32,8 @@ import com.l2jserver.gameserver.handler.TelnetHandler;
 
 
 public class GameStatusThread extends Thread
 public class GameStatusThread extends Thread
 {
 {
+	private static final Logger _log = Logger.getLogger(GameStatusThread.class.getName());
+	
 	private final Socket _cSocket;
 	private final Socket _cSocket;
 	
 	
 	private final PrintWriter _print;
 	private final PrintWriter _print;
@@ -212,7 +215,7 @@ public class GameStatusThread extends Thread
 		}
 		}
 		catch (IOException e)
 		catch (IOException e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 		}
 		}
 	}
 	}
 }
 }

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/status/LoginStatusThread.java

@@ -258,7 +258,7 @@ public class LoginStatusThread extends Thread
 		}
 		}
 		catch (IOException e)
 		catch (IOException e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 		}
 		}
 	}
 	}
 	
 	

+ 2 - 2
L2J_Server_BETA/java/com/l2jserver/status/Status.java

@@ -73,7 +73,7 @@ public class Status extends Thread
 					}
 					}
 					catch (IOException io)
 					catch (IOException io)
 					{
 					{
-						io.printStackTrace();
+						_log.warning(getClass().getSimpleName() + ": " + io.getMessage());
 					}
 					}
 					break;
 					break;
 				}
 				}
@@ -88,7 +88,7 @@ public class Status extends Thread
 					}
 					}
 					catch (IOException io)
 					catch (IOException io)
 					{
 					{
-						io.printStackTrace();
+						_log.warning(getClass().getSimpleName() + ": " + io.getMessage());
 					}
 					}
 					break;
 					break;
 				}
 				}

+ 5 - 4
L2J_Server_BETA/java/com/l2jserver/util/Base64.java

@@ -17,7 +17,7 @@ package com.l2jserver.util;
 import java.io.BufferedReader;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.InputStreamReader;
-
+import java.util.logging.Logger;
 
 
 /**
 /**
  * Encodes and decodes to and from Base64 notation.
  * Encodes and decodes to and from Base64 notation.
@@ -38,6 +38,7 @@ import java.io.InputStreamReader;
  */
  */
 public class Base64
 public class Base64
 {
 {
+	private static final Logger _log = Logger.getLogger(Base64.class.getName());
 	
 	
 	/*  P U B L I C F I E L D S */
 	/*  P U B L I C F I E L D S */
 	
 	
@@ -518,7 +519,7 @@ public class Base64
 			} // end try
 			} // end try
 			catch (java.io.IOException e)
 			catch (java.io.IOException e)
 			{
 			{
-				e.printStackTrace();
+				_log.warning("Base64: " + e.getMessage());
 				return null;
 				return null;
 			} // end catch
 			} // end catch
 			finally
 			finally
@@ -892,11 +893,11 @@ public class Base64
 		}
 		}
 		catch (java.io.IOException e)
 		catch (java.io.IOException e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning("Base64: " + e.getMessage());
 		}
 		}
 		catch (java.lang.ClassNotFoundException e)
 		catch (java.lang.ClassNotFoundException e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning("Base64: " + e.getMessage());
 		}
 		}
 		finally
 		finally
 		{
 		{

+ 6 - 6
L2J_Server_BETA/java/com/l2jserver/util/Util.java

@@ -17,6 +17,7 @@ import java.io.StringWriter;
 import java.net.InetAddress;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.net.UnknownHostException;
 import java.nio.ByteBuffer;
 import java.nio.ByteBuffer;
+import java.util.logging.Logger;
 
 
 /**
 /**
  * This class ...
  * This class ...
@@ -25,6 +26,8 @@ import java.nio.ByteBuffer;
  */
  */
 public class Util
 public class Util
 {
 {
+	private static final Logger _log = Logger.getLogger(Util.class.getName());
+	
 	/**
 	/**
 	 * Checks if a host name is internal
 	 * Checks if a host name is internal
 	 * 
 	 * 
@@ -43,7 +46,7 @@ public class Util
 		}
 		}
 		catch (UnknownHostException e)
 		catch (UnknownHostException e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning("Util: " + e.getMessage());
 		}
 		}
 		return false;
 		return false;
 	}
 	}
@@ -185,11 +188,8 @@ public class Util
 
 
 	/**
 	/**
 	 * Method to get the stack trace of a Throwable into a String
 	 * Method to get the stack trace of a Throwable into a String
-	 * 
-	 * @param t
-	 * 	Throwable to get the stacktrace from
-	 * @return
-	 * 	stack trace from Throwable as String
+	 * @param t Throwable to get the stacktrace from
+	 * @return stack trace from Throwable as String
 	 */
 	 */
 	public static String getStackTrace(Throwable t)
 	public static String getStackTrace(Throwable t)
 	{
 	{

+ 5 - 1
L2J_Server_BETA/java/com/l2jserver/util/network/BaseRecievePacket.java

@@ -14,6 +14,8 @@
  */
  */
 package com.l2jserver.util.network;
 package com.l2jserver.util.network;
 
 
+import java.util.logging.Logger;
+
 /**
 /**
  * This class ...
  * This class ...
  *
  *
@@ -21,6 +23,8 @@ package com.l2jserver.util.network;
  */
  */
 public abstract class BaseRecievePacket
 public abstract class BaseRecievePacket
 {
 {
+	private static final Logger _log = Logger.getLogger(BaseRecievePacket.class.getName());
+	
 	private byte[] _decrypt;
 	private byte[] _decrypt;
 	private int _off;
 	private int _off;
 	
 	
@@ -75,7 +79,7 @@ public abstract class BaseRecievePacket
 		}
 		}
 		catch (Exception e)
 		catch (Exception e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 		}
 		}
 		_off += result.length()*2 + 2;
 		_off += result.length()*2 + 2;
 		return result;
 		return result;

+ 6 - 3
L2J_Server_BETA/java/com/l2jserver/util/network/BaseSendablePacket.java

@@ -16,6 +16,7 @@ package com.l2jserver.util.network;
 
 
 import java.io.ByteArrayOutputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.IOException;
+import java.util.logging.Logger;
 
 
 /**
 /**
  * This class ...
  * This class ...
@@ -24,7 +25,9 @@ import java.io.IOException;
  */
  */
 public abstract class BaseSendablePacket
 public abstract class BaseSendablePacket
 {
 {
-	ByteArrayOutputStream _bao;
+	private static final Logger _log = Logger.getLogger(BaseSendablePacket.class.getName());
+	
+	private final ByteArrayOutputStream _bao;
 	
 	
 	protected BaseSendablePacket()
 	protected BaseSendablePacket()
 	{
 	{
@@ -74,7 +77,7 @@ public abstract class BaseSendablePacket
 		}
 		}
 		catch (Exception e)
 		catch (Exception e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 		}
 		}
 		
 		
 		_bao.write(0);
 		_bao.write(0);
@@ -89,7 +92,7 @@ public abstract class BaseSendablePacket
 		}
 		}
 		catch (IOException e)
 		catch (IOException e)
 		{
 		{
-			e.printStackTrace();
+			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
 		}
 		}
 	}
 	}