2023-11-21 20:37:50 +00:00
|
|
|
// Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License.
|
2023-11-20 18:58:30 +00:00
|
|
|
|
2023-10-27 15:40:58 +00:00
|
|
|
using JetBrains.Annotations;
|
|
|
|
using Microsoft.Extensions.Logging;
|
2023-10-27 17:47:17 +00:00
|
|
|
using Wonderking.Packets;
|
|
|
|
|
2024-01-29 07:39:18 +00:00
|
|
|
namespace Continuity.AuthServer.LoggerMessages;
|
2023-10-27 15:40:58 +00:00
|
|
|
|
2023-11-19 19:04:28 +00:00
|
|
|
internal static partial class PacketLoggerMessages
|
2023-10-27 15:40:58 +00:00
|
|
|
{
|
|
|
|
[LoggerMessage(EventId = 0, Level = LogLevel.Information,
|
|
|
|
Message = "Packet creation function created for {PacketID}")]
|
|
|
|
public static partial void PacketCreationFunctionCreated(this ILogger logger, OperationCode packetId);
|
|
|
|
|
|
|
|
[LoggerMessage(EventId = 1, Level = LogLevel.Trace,
|
|
|
|
Message = "Packet with ID: {PacketID} has been added as {PacketName}")]
|
|
|
|
public static partial void PacketWithIdAdded(this ILogger logger, OperationCode packetId, string packetName);
|
|
|
|
|
|
|
|
[LoggerMessage(EventId = 2, Level = LogLevel.Trace,
|
|
|
|
Message = "PacketHandler with ID: {PacketID} has been added as {PacketName}")]
|
|
|
|
public static partial void PacketHandlerWithIdAdded(this ILogger logger, OperationCode packetId,
|
|
|
|
[CanBeNull] string packetName);
|
|
|
|
|
|
|
|
[LoggerMessage(EventId = 3, Level = LogLevel.Information,
|
|
|
|
Message = "Packet with ID: {PacketID} has been received")]
|
|
|
|
public static partial void PacketReceived(this ILogger logger, OperationCode packetId);
|
|
|
|
|
|
|
|
[LoggerMessage(EventId = 4, Level = LogLevel.Trace,
|
|
|
|
Message = "[{SessionID}] Packet with ID: {PacketID} is being dequeued")]
|
|
|
|
public static partial void PacketDequeued(this ILogger logger, Guid sessionId, OperationCode packetId);
|
|
|
|
|
|
|
|
[LoggerMessage(EventId = 5, Level = LogLevel.Information,
|
|
|
|
Message = "Couldn't find Packet type for Id: {PacketID}")]
|
|
|
|
public static partial void PacketTypeNotFound(this ILogger logger, OperationCode packetId);
|
|
|
|
|
|
|
|
[LoggerMessage(EventId = 6, Level = LogLevel.Trace,
|
|
|
|
Message = "[{SessionID}] Packet with ID: {PacketID} has finished")]
|
|
|
|
public static partial void PacketFinished(this ILogger logger, Guid sessionId, OperationCode packetId);
|
|
|
|
|
|
|
|
[LoggerMessage(EventId = 7, Level = LogLevel.Critical,
|
|
|
|
Message = "No PacketHandlers have been found")]
|
|
|
|
public static partial void NoPacketHandlersFound(this ILogger logger);
|
|
|
|
|
2023-11-22 13:55:46 +00:00
|
|
|
[LoggerMessage(EventId = 8, Level = LogLevel.Trace,
|
2023-10-27 15:40:58 +00:00
|
|
|
Message = "Packet data {PacketData}")]
|
|
|
|
public static partial void PacketData(this ILogger logger, string packetData);
|
|
|
|
|
|
|
|
[LoggerMessage(EventId = 9, Level = LogLevel.Critical,
|
|
|
|
Message = "No Packets have been found")]
|
|
|
|
public static partial void NoPacketsFound(this ILogger logger);
|
|
|
|
}
|