Merged with released L2J-Unity files.
This commit is contained in:
41
trunk/java/com/l2jmobius/log/L2LogManager.java
Normal file
41
trunk/java/com/l2jmobius/log/L2LogManager.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.log;
|
||||
|
||||
import java.util.logging.LogManager;
|
||||
|
||||
/**
|
||||
* Specialized {@link LogManager} class.<br>
|
||||
* Prevents log devices to close before shutdown sequence so the shutdown sequence can make logging.
|
||||
*/
|
||||
public class L2LogManager extends LogManager
|
||||
{
|
||||
public L2LogManager()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
public void doReset()
|
||||
{
|
||||
super.reset();
|
||||
}
|
||||
}
|
@@ -39,7 +39,7 @@ public class ItemFilter implements Filter
|
||||
static
|
||||
{
|
||||
EXCLUDED_ITEM_TYPES.add(EtcItemType.ARROW);
|
||||
EXCLUDED_ITEM_TYPES.add(EtcItemType.SHOT);
|
||||
EXCLUDED_ITEM_TYPES.add(EtcItemType.SOULSHOT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -22,9 +22,10 @@ import java.util.logging.Formatter;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.util.StringUtil;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
import com.l2jmobius.util.StringUtil;
|
||||
import com.l2jmobius.gameserver.network.client.ConnectionState;
|
||||
import com.l2jmobius.gameserver.network.client.L2GameClient;
|
||||
|
||||
public class AccountingFormatter extends Formatter
|
||||
{
|
||||
@@ -55,14 +56,14 @@ public class AccountingFormatter extends Formatter
|
||||
{
|
||||
if (!client.isDetached())
|
||||
{
|
||||
address = client.getConnection().getInetAddress().getHostAddress();
|
||||
address = client.getConnectionAddress().getHostAddress();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
|
||||
switch (client.getState())
|
||||
switch ((ConnectionState) client.getConnectionState())
|
||||
{
|
||||
case IN_GAME:
|
||||
{
|
||||
@@ -73,7 +74,7 @@ public class AccountingFormatter extends Formatter
|
||||
}
|
||||
break;
|
||||
}
|
||||
case AUTHED:
|
||||
case AUTHENTICATED:
|
||||
{
|
||||
if (client.getAccountName() != null)
|
||||
{
|
||||
|
@@ -22,7 +22,7 @@ import java.util.logging.Formatter;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.util.StringUtil;
|
||||
import com.l2jmobius.commons.util.StringUtil;
|
||||
|
||||
/**
|
||||
* @author zabbix
|
||||
|
@@ -22,7 +22,7 @@ import java.util.logging.Formatter;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.util.StringUtil;
|
||||
import com.l2jmobius.commons.util.StringUtil;
|
||||
|
||||
public class ChatLogFormatter extends Formatter
|
||||
{
|
||||
|
@@ -22,8 +22,8 @@ import java.util.logging.Formatter;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.util.StringUtil;
|
||||
import com.l2jmobius.util.Util;
|
||||
import com.l2jmobius.commons.util.CommonUtil;
|
||||
import com.l2jmobius.commons.util.StringUtil;
|
||||
|
||||
public class ConsoleLogFormatter extends Formatter
|
||||
{
|
||||
@@ -39,7 +39,7 @@ public class ConsoleLogFormatter extends Formatter
|
||||
{
|
||||
try
|
||||
{
|
||||
StringUtil.append(output, Util.getStackTrace(record.getThrown()), Config.EOL);
|
||||
StringUtil.append(output, CommonUtil.getStackTrace(record.getThrown()), Config.EOL);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@@ -22,12 +22,11 @@ import java.util.logging.Formatter;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.commons.util.StringUtil;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.util.StringUtil;
|
||||
|
||||
public class DamageFormatter extends Formatter
|
||||
{
|
||||
@@ -50,7 +49,7 @@ public class DamageFormatter extends Formatter
|
||||
|
||||
if (p instanceof L2Character)
|
||||
{
|
||||
if ((p instanceof L2Attackable) && ((L2Attackable) p).isRaid())
|
||||
if ((p instanceof L2Character) && ((L2Character) p).isRaid())
|
||||
{
|
||||
StringUtil.append(output, "RaidBoss ");
|
||||
}
|
||||
|
@@ -22,10 +22,10 @@ import java.util.logging.Formatter;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.util.StringUtil;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.util.StringUtil;
|
||||
|
||||
public class EnchantFormatter extends Formatter
|
||||
{
|
||||
@@ -54,7 +54,7 @@ public class EnchantFormatter extends Formatter
|
||||
StringUtil.append(output, "Character:", player.getName(), " [" + String.valueOf(player.getObjectId()) + "] Account:", player.getAccountName());
|
||||
if ((player.getClient() != null) && !player.getClient().isDetached())
|
||||
{
|
||||
StringUtil.append(output, " IP:", player.getClient().getConnection().getInetAddress().getHostAddress());
|
||||
StringUtil.append(output, " IP:", player.getClient().getConnectionAddress().getHostAddress());
|
||||
}
|
||||
}
|
||||
else if (p instanceof L2ItemInstance)
|
||||
|
@@ -22,7 +22,7 @@ import java.util.logging.Formatter;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.util.StringUtil;
|
||||
import com.l2jmobius.commons.util.StringUtil;
|
||||
|
||||
/**
|
||||
* This class ...
|
||||
|
@@ -22,8 +22,8 @@ import java.util.logging.Formatter;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.util.StringUtil;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.util.StringUtil;
|
||||
|
||||
/**
|
||||
* @author Advi
|
||||
|
@@ -22,7 +22,7 @@ import java.util.logging.Formatter;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.util.StringUtil;
|
||||
import com.l2jmobius.commons.util.StringUtil;
|
||||
|
||||
public class OlympiadFormatter extends Formatter
|
||||
{
|
||||
|
Reference in New Issue
Block a user