|
| 1 | +using Microsoft.Extensions.Logging; |
| 2 | + |
| 3 | +namespace DiscordArchitect.Logging; |
| 4 | + |
| 5 | +/// <summary> |
| 6 | +/// Defines structured logging events with consistent event IDs for the DiscordArchitect application. |
| 7 | +/// </summary> |
| 8 | +public static class LoggingEvents |
| 9 | +{ |
| 10 | + // Application lifecycle events (1000-1099) |
| 11 | + public static readonly EventId ApplicationStarting = new(1001, "ApplicationStarting"); |
| 12 | + public static readonly EventId ApplicationStarted = new(1002, "ApplicationStarted"); |
| 13 | + public static readonly EventId ApplicationStopping = new(1003, "ApplicationStopping"); |
| 14 | + public static readonly EventId ApplicationStopped = new(1004, "ApplicationStopped"); |
| 15 | + |
| 16 | + // Configuration events (1100-1199) |
| 17 | + public static readonly EventId ConfigurationValidationStarted = new(1101, "ConfigurationValidationStarted"); |
| 18 | + public static readonly EventId ConfigurationValidationPassed = new(1102, "ConfigurationValidationPassed"); |
| 19 | + public static readonly EventId ConfigurationValidationFailed = new(1103, "ConfigurationValidationFailed"); |
| 20 | + public static readonly EventId ConfigurationLoaded = new(1104, "ConfigurationLoaded"); |
| 21 | + |
| 22 | + // Discord connection events (1200-1299) |
| 23 | + public static readonly EventId DiscordConnecting = new(1201, "DiscordConnecting"); |
| 24 | + public static readonly EventId DiscordConnected = new(1202, "DiscordConnected"); |
| 25 | + public static readonly EventId DiscordDisconnected = new(1203, "DiscordDisconnected"); |
| 26 | + public static readonly EventId DiscordReady = new(1204, "DiscordReady"); |
| 27 | + public static readonly EventId DiscordLoginFailed = new(1205, "DiscordLoginFailed"); |
| 28 | + |
| 29 | + // Guild operations (1300-1399) |
| 30 | + public static readonly EventId GuildFound = new(1301, "GuildFound"); |
| 31 | + public static readonly EventId GuildNotFound = new(1302, "GuildNotFound"); |
| 32 | + public static readonly EventId GuildPermissionsChecked = new(1303, "GuildPermissionsChecked"); |
| 33 | + |
| 34 | + // Category operations (1400-1499) |
| 35 | + public static readonly EventId CategorySearchStarted = new(1401, "CategorySearchStarted"); |
| 36 | + public static readonly EventId CategoryFound = new(1402, "CategoryFound"); |
| 37 | + public static readonly EventId CategoryNotFound = new(1403, "CategoryNotFound"); |
| 38 | + public static readonly EventId CategoryCreated = new(1404, "CategoryCreated"); |
| 39 | + public static readonly EventId CategoryDeleted = new(1405, "CategoryDeleted"); |
| 40 | + |
| 41 | + // Channel operations (1500-1599) |
| 42 | + public static readonly EventId ChannelCreated = new(1501, "ChannelCreated"); |
| 43 | + public static readonly EventId ChannelDeleted = new(1501, "ChannelDeleted"); |
| 44 | + public static readonly EventId ChannelSynced = new(1503, "ChannelSynced"); |
| 45 | + public static readonly EventId ChannelPermissionsApplied = new(1504, "ChannelPermissionsApplied"); |
| 46 | + |
| 47 | + // Role operations (1600-1699) |
| 48 | + public static readonly EventId RoleCreated = new(1601, "RoleCreated"); |
| 49 | + public static readonly EventId RoleDeleted = new(1602, "RoleDeleted"); |
| 50 | + public static readonly EventId RolePermissionsApplied = new(1603, "RolePermissionsApplied"); |
| 51 | + |
| 52 | + // Forum operations (1700-1799) |
| 53 | + public static readonly EventId ForumTagsPatching = new(1701, "ForumTagsPatching"); |
| 54 | + public static readonly EventId ForumTagsPatched = new(1702, "ForumTagsPatched"); |
| 55 | + public static readonly EventId ForumTagsPatchFailed = new(1703, "ForumTagsPatchFailed"); |
| 56 | + |
| 57 | + // Test mode operations (1800-1899) |
| 58 | + public static readonly EventId TestModeStarted = new(1801, "TestModeStarted"); |
| 59 | + public static readonly EventId TestModeCompleted = new(1802, "TestModeCompleted"); |
| 60 | + public static readonly EventId TestModeCleanupStarted = new(1803, "TestModeCleanupStarted"); |
| 61 | + public static readonly EventId TestModeCleanupCompleted = new(1804, "TestModeCleanupCompleted"); |
| 62 | + |
| 63 | + // Verification operations (1900-1999) |
| 64 | + public static readonly EventId VerificationStarted = new(1901, "VerificationStarted"); |
| 65 | + public static readonly EventId VerificationCompleted = new(1902, "VerificationCompleted"); |
| 66 | + public static readonly EventId VerificationFinding = new(1903, "VerificationFinding"); |
| 67 | + public static readonly EventId VerificationSummary = new(1904, "VerificationSummary"); |
| 68 | + |
| 69 | + // Error events (2000-2099) |
| 70 | + public static readonly EventId UnexpectedError = new(2001, "UnexpectedError"); |
| 71 | + public static readonly EventId ValidationError = new(2002, "ValidationError"); |
| 72 | + public static readonly EventId DiscordApiError = new(2003, "DiscordApiError"); |
| 73 | + public static readonly EventId NetworkError = new(2004, "NetworkError"); |
| 74 | + |
| 75 | + // Warning events (2100-2199) |
| 76 | + public static readonly EventId PermissionWarning = new(2101, "PermissionWarning"); |
| 77 | + public static readonly EventId ConfigurationWarning = new(2102, "ConfigurationWarning"); |
| 78 | + public static readonly EventId ResourceWarning = new(2103, "ResourceWarning"); |
| 79 | + |
| 80 | + // Info events (2200-2299) |
| 81 | + public static readonly EventId OperationInfo = new(2201, "OperationInfo"); |
| 82 | + public static readonly EventId DiagnosticInfo = new(2202, "DiagnosticInfo"); |
| 83 | + public static readonly EventId PerformanceInfo = new(2203, "PerformanceInfo"); |
| 84 | +} |
0 commit comments