Minor logger changes.

This commit is contained in:
MobiusDev
2018-04-14 07:45:05 +00:00
parent c953762eb9
commit 597a61be00
74 changed files with 346 additions and 346 deletions

View File

@@ -32,7 +32,7 @@ import com.l2jmobius.gameserver.network.serverpackets.VehicleStarted;
*/
public class L2BoatInstance extends L2Vehicle
{
protected static final Logger _logBoat = Logger.getLogger(L2BoatInstance.class.getName());
protected static final Logger LOGGER_BOAT = Logger.getLogger(L2BoatInstance.class.getName());
/**
* Creates a boat.

View File

@@ -73,7 +73,7 @@ import com.l2jmobius.gameserver.taskmanager.DecayTaskManager;
public class L2PetInstance extends L2Summon
{
protected static final Logger _logPet = Logger.getLogger(L2PetInstance.class.getName());
protected static final Logger LOGGER_PET = Logger.getLogger(L2PetInstance.class.getName());
private static final String ADD_SKILL_SAVE = "INSERT INTO character_pet_skills_save (petObjItemId,skill_id,skill_level,remaining_time,buff_index) VALUES (?,?,?,?,?)";
private static final String RESTORE_SKILL_SAVE = "SELECT petObjItemId,skill_id,skill_level,remaining_time,buff_index FROM character_pet_skills_save WHERE petObjItemId=? ORDER BY buff_index ASC";
@@ -224,7 +224,7 @@ public class L2PetInstance extends L2Summon
}
catch (Exception e)
{
_logPet.log(Level.SEVERE, "Pet [ObjectId: " + getObjectId() + "] a feed task error has occurred", e);
LOGGER_PET.log(Level.SEVERE, "Pet [ObjectId: " + getObjectId() + "] a feed task error has occurred", e);
}
}
@@ -465,7 +465,7 @@ public class L2PetInstance extends L2Summon
if (!(object instanceof L2ItemInstance))
{
// dont try to pickup anything that is not an item :)
_logPet.warning(this + " trying to pickup wrong target." + object);
LOGGER_PET.warning(this + " trying to pickup wrong target." + object);
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
@@ -771,7 +771,7 @@ public class L2PetInstance extends L2Summon
}
catch (Exception e)
{
_logPet.log(Level.WARNING, "Error while destroying control item: " + e.getMessage(), e);
LOGGER_PET.log(Level.WARNING, "Error while destroying control item: " + e.getMessage(), e);
}
// pet control item no longer exists, delete the pet from the db
@@ -783,7 +783,7 @@ public class L2PetInstance extends L2Summon
}
catch (Exception e)
{
_logPet.log(Level.SEVERE, "Failed to delete Pet [ObjectId: " + getObjectId() + "]", e);
LOGGER_PET.log(Level.SEVERE, "Failed to delete Pet [ObjectId: " + getObjectId() + "]", e);
}
}
@@ -798,7 +798,7 @@ public class L2PetInstance extends L2Summon
}
catch (Exception e)
{
_logPet.log(Level.WARNING, "Pet Drop Error: " + e.getMessage(), e);
LOGGER_PET.log(Level.WARNING, "Pet Drop Error: " + e.getMessage(), e);
}
}
@@ -814,7 +814,7 @@ public class L2PetInstance extends L2Summon
{
dropit.getDropProtection().protect(getOwner());
}
_logPet.finer("Item id to drop: " + dropit.getId() + " amount: " + dropit.getCount());
LOGGER_PET.finer("Item id to drop: " + dropit.getId() + " amount: " + dropit.getCount());
dropit.dropMe(this, getX(), getY(), getZ() + 100);
}
@@ -893,7 +893,7 @@ public class L2PetInstance extends L2Summon
}
catch (Exception e)
{
_logPet.log(Level.WARNING, "Could not restore pet data for owner: " + owner + " - " + e.getMessage(), e);
LOGGER_PET.log(Level.WARNING, "Could not restore pet data for owner: " + owner + " - " + e.getMessage(), e);
}
return null;
}
@@ -954,7 +954,7 @@ public class L2PetInstance extends L2Summon
}
catch (Exception e)
{
_logPet.log(Level.SEVERE, "Failed to store Pet [ObjectId: " + getObjectId() + "] data", e);
LOGGER_PET.log(Level.SEVERE, "Failed to store Pet [ObjectId: " + getObjectId() + "] data", e);
}
final L2ItemInstance itemInst = getControlItem();

View File

@@ -48,7 +48,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
public abstract class AbstractOlympiadGame
{
protected static final Logger LOGGER = Logger.getLogger(AbstractOlympiadGame.class.getName());
protected static final Logger _logResults = Logger.getLogger("olympiad");
protected static final Logger LOGGER_OLYMPIAD = Logger.getLogger("olympiad");
protected static final String POINTS = "olympiad_points";
protected static final String COMP_DONE = "competitions_done";

View File

@@ -55,7 +55,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
public class Olympiad extends ListenersContainer
{
protected static final Logger LOGGER = Logger.getLogger(Olympiad.class.getName());
protected static final Logger _logResults = Logger.getLogger("olympiad");
protected static final Logger LOGGER_OLYMPIAD = Logger.getLogger("olympiad");
private static final Map<Integer, StatsSet> NOBLES = new ConcurrentHashMap<>();
private static final List<StatsSet> HEROS_TO_BE = new ArrayList<>();
@@ -521,7 +521,7 @@ public class Olympiad extends ListenersContainer
Broadcast.toAllOnlinePlayers(SystemMessage.getSystemMessage(SystemMessageId.SHARPEN_YOUR_SWORDS_TIGHTEN_THE_STITCHING_IN_YOUR_ARMOR_AND_MAKE_HASTE_TO_A_GRAND_OLYMPIAD_MANAGER_BATTLES_IN_THE_GRAND_OLYMPIAD_GAMES_ARE_NOW_TAKING_PLACE));
LOGGER.info("Olympiad System: Olympiad Game Started");
_logResults.info("Result,Player1,Player2,Player1 HP,Player2 HP,Player1 Damage,Player2 Damage,Points,Classed");
LOGGER_OLYMPIAD.info("Result,Player1,Player2,Player1 HP,Player2 HP,Player1 Damage,Player2 Damage,Points,Classed");
_gameManager = ThreadPool.scheduleAtFixedRate(OlympiadGameManager.getInstance(), 30000, 30000);
if (Config.ALT_OLY_ANNOUNCE_GAMES)
@@ -974,7 +974,7 @@ public class Olympiad extends ListenersContainer
}
LogRecord record;
_logResults.info("Noble,charid,classid,compDone,points");
LOGGER_OLYMPIAD.info("Noble,charid,classid,compDone,points");
for (Entry<Integer, StatsSet> entry : NOBLES.entrySet())
{
final StatsSet nobleInfo = entry.getValue();
@@ -997,7 +997,7 @@ public class Olympiad extends ListenersContainer
compDone,
points
});
_logResults.log(record);
LOGGER_OLYMPIAD.log(record);
}
try (Connection con = DatabaseFactory.getInstance().getConnection();
@@ -1032,7 +1032,7 @@ public class Olympiad extends ListenersContainer
hero.getInt(CHAR_ID),
hero.getInt(CLASS_ID)
});
_logResults.log(record);
LOGGER_OLYMPIAD.log(record);
HEROS_TO_BE.add(hero);
}
}
@@ -1059,7 +1059,7 @@ public class Olympiad extends ListenersContainer
hero.getInt(CHAR_ID),
hero.getInt(CLASS_ID)
});
_logResults.log(record);
LOGGER_OLYMPIAD.log(record);
HEROS_TO_BE.add(hero);
break;
}
@@ -1111,7 +1111,7 @@ public class Olympiad extends ListenersContainer
hero.getInt(CHAR_ID),
hero.getInt(CLASS_ID)
});
_logResults.log(record);
LOGGER_OLYMPIAD.log(record);
HEROS_TO_BE.add(hero);
break;
}

View File

@@ -366,7 +366,7 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
points,
getType().toString()
});
_logResults.log(record);
LOGGER_OLYMPIAD.log(record);
}
}
catch (Exception e)
@@ -405,7 +405,7 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
points,
getType().toString()
});
_logResults.log(record);
LOGGER_OLYMPIAD.log(record);
}
}
catch (Exception e)
@@ -468,7 +468,7 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
pointDiff,
getType().toString()
});
_logResults.log(record);
LOGGER_OLYMPIAD.log(record);
}
// Notify to scripts
@@ -506,7 +506,7 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
pointDiff,
getType().toString()
});
_logResults.log(record);
LOGGER_OLYMPIAD.log(record);
}
// Notify to scripts
EventDispatcher.getInstance().notifyEventAsync(new OnOlympiadMatchResult(_playerTwo, _playerOne, getType()), Olympiad.getInstance());
@@ -539,7 +539,7 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
pointDiff,
getType().toString()
});
_logResults.log(record);
LOGGER_OLYMPIAD.log(record);
}
}
@@ -711,7 +711,7 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
pointDiff,
getType().toString()
});
_logResults.log(record);
LOGGER_OLYMPIAD.log(record);
}
}
catch (Exception e)

View File

@@ -44,7 +44,7 @@ import com.l2jmobius.gameserver.util.Util;
public final class RequestEnchantItem implements IClientIncomingPacket
{
protected static final Logger _logEnchant = Logger.getLogger("enchant");
protected static final Logger LOGGER_ENCHANT = Logger.getLogger("enchant.items");
private int _objectId;
private int _supportId;
@@ -198,7 +198,7 @@ public final class RequestEnchantItem implements IClientIncomingPacket
support,
});
record.setLoggerName("item");
_logEnchant.log(record);
LOGGER_ENCHANT.log(record);
}
// announce the success
@@ -250,7 +250,7 @@ public final class RequestEnchantItem implements IClientIncomingPacket
support,
});
record.setLoggerName("item");
_logEnchant.log(record);
LOGGER_ENCHANT.log(record);
}
}
else
@@ -302,7 +302,7 @@ public final class RequestEnchantItem implements IClientIncomingPacket
support,
});
record.setLoggerName("item");
_logEnchant.log(record);
LOGGER_ENCHANT.log(record);
}
}
else
@@ -327,7 +327,7 @@ public final class RequestEnchantItem implements IClientIncomingPacket
support,
});
record.setLoggerName("item");
_logEnchant.log(record);
LOGGER_ENCHANT.log(record);
}
return;
}
@@ -363,7 +363,7 @@ public final class RequestEnchantItem implements IClientIncomingPacket
support,
});
record.setLoggerName("item");
_logEnchant.log(record);
LOGGER_ENCHANT.log(record);
}
}
}

View File

@@ -46,7 +46,7 @@ import com.l2jmobius.gameserver.network.serverpackets.UserInfo;
*/
public final class RequestExEnchantSkill implements IClientIncomingPacket
{
private static final Logger _logEnchant = Logger.getLogger("enchant");
private static final Logger LOGGER_ENCHANT = Logger.getLogger("enchant.skills");
private int _skillId;
private int _skillLvl;
@@ -164,7 +164,7 @@ public final class RequestExEnchantSkill implements IClientIncomingPacket
rate
});
record.setLoggerName("skill");
_logEnchant.log(record);
LOGGER_ENCHANT.log(record);
}
player.addSkill(skill, true);
@@ -191,7 +191,7 @@ public final class RequestExEnchantSkill implements IClientIncomingPacket
rate
});
record.setLoggerName("skill");
_logEnchant.log(record);
LOGGER_ENCHANT.log(record);
}
}

View File

@@ -46,7 +46,7 @@ import com.l2jmobius.gameserver.network.serverpackets.UserInfo;
*/
public final class RequestExEnchantSkillRouteChange implements IClientIncomingPacket
{
private static final Logger _logEnchant = Logger.getLogger("enchant");
private static final Logger LOGGER_ENCHANT = Logger.getLogger("enchant.skills");
private int _skillId;
private int _skillLvl;
@@ -178,7 +178,7 @@ public final class RequestExEnchantSkillRouteChange implements IClientIncomingPa
spb
});
record.setLoggerName("skill");
_logEnchant.log(record);
LOGGER_ENCHANT.log(record);
}
player.addSkill(skill, true);

View File

@@ -46,7 +46,7 @@ import com.l2jmobius.gameserver.network.serverpackets.UserInfo;
*/
public final class RequestExEnchantSkillSafe implements IClientIncomingPacket
{
private static final Logger _logEnchant = Logger.getLogger("enchant");
private static final Logger LOGGER_ENCHANT = Logger.getLogger("enchant.skills");
private int _skillId;
private int _skillLvl;
@@ -157,7 +157,7 @@ public final class RequestExEnchantSkillSafe implements IClientIncomingPacket
rate
});
record.setLoggerName("skill");
_logEnchant.log(record);
LOGGER_ENCHANT.log(record);
}
player.addSkill(skill, true);
@@ -181,7 +181,7 @@ public final class RequestExEnchantSkillSafe implements IClientIncomingPacket
rate
});
record.setLoggerName("skill");
_logEnchant.log(record);
LOGGER_ENCHANT.log(record);
}
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.SKILL_ENCHANT_FAILED_CURRENT_LEVEL_OF_ENCHANT_SKILL_S1_WILL_REMAIN_UNCHANGED);

View File

@@ -45,7 +45,7 @@ import com.l2jmobius.gameserver.network.serverpackets.UserInfo;
*/
public final class RequestExEnchantSkillUntrain implements IClientIncomingPacket
{
private static final Logger _logEnchant = Logger.getLogger("enchant");
private static final Logger LOGGER_ENCHANT = Logger.getLogger("enchant.skills");
private int _skillId;
private int _skillLvl;
@@ -162,7 +162,7 @@ public final class RequestExEnchantSkillUntrain implements IClientIncomingPacket
spb
});
record.setLoggerName("skill");
_logEnchant.log(record);
LOGGER_ENCHANT.log(record);
}
player.addSkill(skill, true);

View File

@@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.network.serverpackets.L2FriendSay;
*/
public final class RequestSendFriendMsg implements IClientIncomingPacket
{
private static Logger _logChat = Logger.getLogger("chat");
private static Logger LOGGER_CHAT = Logger.getLogger("chat");
private String _message;
private String _reciever;
@@ -78,7 +78,7 @@ public final class RequestSendFriendMsg implements IClientIncomingPacket
"[" + activeChar.getName() + " to " + _reciever + "]"
});
_logChat.log(record);
LOGGER_CHAT.log(record);
}
targetPlayer.sendPacket(new L2FriendSay(activeChar.getName(), _reciever, _message));

View File

@@ -45,7 +45,7 @@ import com.l2jmobius.gameserver.util.Util;
*/
public final class Say2 implements IClientIncomingPacket
{
private static Logger _logChat = Logger.getLogger("chat");
private static Logger LOGGER_CHAT = Logger.getLogger("chat");
private static final String[] WALKER_COMMAND_LIST =
{
@@ -192,7 +192,7 @@ public final class Say2 implements IClientIncomingPacket
});
}
_logChat.log(record);
LOGGER_CHAT.log(record);
}
if ((_text.indexOf(8) >= 0) && !parseAndPublishItem(activeChar))

View File

@@ -24,6 +24,6 @@ public class EnchantItemFilter implements Filter
@Override
public boolean isLoggable(LogRecord record)
{
return record.getLoggerName().equalsIgnoreCase("item");
return record.getLoggerName().equalsIgnoreCase("enchant.items");
}
}

View File

@@ -24,6 +24,6 @@ public class EnchantSkillFilter implements Filter
@Override
public boolean isLoggable(LogRecord record)
{
return record.getLoggerName().equalsIgnoreCase("skill");
return record.getLoggerName().equalsIgnoreCase("enchant.skills");
}
}