Class PacketLogger
Provides the logging of packets, by their protocol, where the log takes trace lines.
public static class PacketLogger
- Inheritance
-
PacketLogger
- Inherited Members
Methods
LogPacket(IpPacket, string, LogLevel, Exception?, EventId?)
Logs a packet with a message, under its protocol's event ID; it does nothing unless the log takes trace lines.
public static void LogPacket(IpPacket ipPacket, string message, LogLevel logLevel = LogLevel.Trace, Exception? exception = null, EventId? eventId = null)
Parameters
ipPacketIpPacketThe packet.
messagestringThe message.
logLevelLogLevelThe line's level. The default is Trace.
exceptionExceptionThe error to log with it, or null.
eventIdEventId?The event ID, or null for the packet's protocol's, or the packet's own for a fragment or another protocol. A line with a NetFilterException takes the filter's event ID whatever this says.