Fixed NLog config for map server. Added some debug printouts while testing.

This commit is contained in:
Filip Maj 2016-08-29 09:03:48 -04:00
parent 37b098e87a
commit 06e7ea59f4
4 changed files with 12 additions and 5 deletions

View File

@ -38,13 +38,13 @@
<target xsi:type="ColoredConsole" name="packets" <target xsi:type="ColoredConsole" name="packets"
layout="${message}"> layout="${message}">
<highlight-row <highlight-row
condition="equals('${logger}', 'FFXIVClassic_Map_Server.packets.BasePacket') and equals('${event-context:item=color}', '6')" condition="equals('${logger}', 'FFXIVClassic.Common.BasePacket') and equals('${event-context:item=color}', '6')"
backgroundColor="DarkYellow" foregroundColor="NoChange" /> backgroundColor="DarkYellow" foregroundColor="NoChange" />
<highlight-row <highlight-row
condition="equals('${logger}', 'FFXIVClassic_Map_Server.packets.SubPacket') and equals('${event-context:item=color}', '4')" condition="equals('${logger}', 'FFXIVClassic.Common.SubPacket') and equals('${event-context:item=color}', '4')"
backgroundColor="DarkRed" foregroundColor="NoChange" /> backgroundColor="DarkRed" foregroundColor="NoChange" />
<highlight-row <highlight-row
condition="equals('${logger}', 'FFXIVClassic_Map_Server.packets.SubPacket') and equals('${event-context:item=color}', '5')" condition="equals('${logger}', 'FFXIVClassic.Common.SubPacket') and equals('${event-context:item=color}', '5')"
backgroundColor="DarkMagenta" foregroundColor="NoChange" /> backgroundColor="DarkMagenta" foregroundColor="NoChange" />
</target> </target>
</targets> </targets>
@ -55,6 +55,7 @@
<logger name='FFXIVClassic_Map_Server.Program' minlevel='Trace' writeTo='console' /> <logger name='FFXIVClassic_Map_Server.Program' minlevel='Trace' writeTo='console' />
<logger name='FFXIVClassic_Map_Server.lua.*' minlevel='Trace' writeTo='console' /> <logger name='FFXIVClassic_Map_Server.lua.*' minlevel='Trace' writeTo='console' />
<logger name='FFXIVClassic_Map_Server.packets.*' minlevel='Debug' writeTo='packets' /> <logger name='FFXIVClassic_Map_Server.packets.*' minlevel='Debug' writeTo='packets' />
<logger name='FFXIVClassic.Common.*' minlevel='Debug' writeTo='packets' />
<!-- <!--
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f" Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
<logger name="*" minlevel="Debug" writeTo="f" /> <logger name="*" minlevel="Debug" writeTo="f" />

View File

@ -4,6 +4,7 @@ using System.Net.Sockets;
using FFXIVClassic.Common; using FFXIVClassic.Common;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Net; using System.Net;
using System.Collections.Generic;
namespace FFXIVClassic_Map_Server namespace FFXIVClassic_Map_Server
{ {
@ -17,7 +18,9 @@ namespace FFXIVClassic_Map_Server
public void QueuePacket(BasePacket packet) public void QueuePacket(BasePacket packet)
{ {
//SendPacketQueue.Add(packet); List<SubPacket> subPackets = packet.GetSubpackets();
foreach (SubPacket s in subPackets)
SendPacketQueue.Add(s);
} }
public void QueuePacket(SubPacket subpacket, bool isAuthed, bool isEncrypted) public void QueuePacket(SubPacket subpacket, bool isAuthed, bool isEncrypted)

View File

@ -37,6 +37,8 @@ namespace FFXIVClassic_World_Server
{ {
BasePacket packet = SendPacketQueue.Take(); BasePacket packet = SendPacketQueue.Take();
packet.DebugPrintPacket();
byte[] packetBytes = packet.GetPacketBytes(); byte[] packetBytes = packet.GetPacketBytes();
try try

View File

@ -136,6 +136,7 @@ namespace FFXIVClassic_World_Server
public void OnReceiveSubPacketFromZone(ZoneServer zoneServer, SubPacket subpacket) public void OnReceiveSubPacketFromZone(ZoneServer zoneServer, SubPacket subpacket)
{ {
subpacket.DebugPrintSubPacket();
uint sessionId = subpacket.header.targetId; uint sessionId = subpacket.header.targetId;
if (mZoneSessionList.ContainsKey(sessionId)) if (mZoneSessionList.ContainsKey(sessionId))