@cryptotaxi247 / netdata-1 / commits / 6cf5176af

Revert "fix windows logs" (#19639)

Revert "fix windows logs (#19632)" This reverts commit d8c3dc087c7285400b229f972d081e1df340fbf2.

Costa Tsaousis committed Feb 13, 2025 at 14:22 UTC 6cf5176afed731e4f6c36942529296fa5ddd40a1
2 files changed +18 -19
src/libnetdata/log/nd_log-common.h
+5 -5
@@ -117,15 +117,15 @@ typedef enum __attribute__((__packed__)) {
117 NDF_ALERT_SUMMARY = 60,
118 NDF_ALERT_INFO = 61,
119 NDF_ALERT_NOTIFICATION_REALTIME_USEC = 62,
120 + // NDF_ALERT_FLAGS,
121
122 NDF_STACK_TRACE = 63, // stack trace of the thread logging
122 - NDF_REQUEST = 64, // the request we are currently working on
123 - NDF_MESSAGE = 65, // the log message, if any
124 -
125 - // DO NOT CHANGE OR RENUMBER ANY OF THE ABOVE
126 - // THEY ARE HARDCODED INTO THE WEVT MANIFEST!
123
124 // put new items here
125 + // leave the request URL and the message last
126 +
127 + NDF_REQUEST = 64, // the request we are currently working on
128 + NDF_MESSAGE = 65, // the log message, if any
129
130 // terminator
131 _NDF_MAX,
src/libnetdata/log/wevt_netdata_mc_generate.c
+13 -14
@@ -67,35 +67,35 @@ const char *get_msg_symbol(MESSAGE_ID msg) {
67 const char *get_msg_format(MESSAGE_ID msg) {
68 switch(msg) {
69 case MSGID_MESSAGE_ONLY:
70 - return "%2(%12): %65\r\n";
70 + return "%2(%12): %64\r\n";
71
72 case MSGID_MESSAGE_ERRNO:
73 - return "%2(%12): %65%n\r\n"
73 + return "%2(%12): %64%n\r\n"
74 "%n\r\n"
75 " Unix Errno : %5%n\r\n"
76 " Windows Error: %6%n\r\n"
77 ;
78
79 case MSGID_REQUEST_ONLY:
80 - return "%2(%12): %64\r\n";
80 + return "%2(%12): %63\r\n";
81
82 case MSGID_ACCESS_MESSAGE:
83 - return "%65\r\n";
83 + return "%64\r\n";
84
85 case MSGID_ACCESS_MESSAGE_REQUEST:
86 - return "%65%n\r\n"
86 + return "%64%n\r\n"
87 "%n\r\n"
88 - " Request: %64%n\r\n"
88 + " Request: %63%n\r\n"
89 ;
90
91 case MSGID_ACCESS_MESSAGE_USER:
92 - return "%65%n\r\n"
92 + return "%64%n\r\n"
93 "%n\r\n"
94 " User: %21, role: %22, permissions: %23%n\r\n"
95 ;
96
97 case MSGID_ACCESS:
98 - return "%33 %64%n\r\n"
98 + return "%33 %63%n\r\n"
99 "%n\r\n"
100 " Response Code : %34%n\r\n"
101 " Transaction ID: %36%n\r\n"
@@ -103,7 +103,7 @@ const char *get_msg_format(MESSAGE_ID msg) {
103 ;
104
105 case MSGID_ACCESS_USER:
106 - return "%33 %64%n\r\n"
106 + return "%33 %63%n\r\n"
107 "%n\r\n"
108 " Response Code : %34%n\r\n"
109 " Transaction ID: %36%n\r\n"
@@ -112,7 +112,7 @@ const char *get_msg_format(MESSAGE_ID msg) {
112 ;
113
114 case MSGID_ACCESS_FORWARDER:
115 - return "%33 %64%n\r\n"
115 + return "%33 %63%n\r\n"
116 "%n\r\n"
117 " Response Code : %34%n\r\n"
118 " Transaction ID: %36%n\r\n"
@@ -120,7 +120,7 @@ const char *get_msg_format(MESSAGE_ID msg) {
120 ;
121
122 case MSGID_ACCESS_FORWARDER_USER:
123 - return "%33 %64%n\r\n"
123 + return "%33 %63%n\r\n"
124 "%n\r\n"
125 " Response Code : %34%n\r\n"
126 " Transaction ID: %36%n\r\n"
@@ -282,9 +282,8 @@ int main(int argc, const char **argv) {
282 " <data name=\"AlertSummary\" inType=\"win:UnicodeString\"/> <!-- 60 (NDF_ALERT_SUMMARY) -->\r\n"
283 " <data name=\"AlertInfo\" inType=\"win:UnicodeString\"/> <!-- 61 (NDF_ALERT_INFO) -->\r\n"
284 " <data name=\"AlertNotificationTime\" inType=\"win:UnicodeString\"/> <!-- 62 (NDF_ALERT_NOTIFICATION_REALTIME_USEC) -->\r\n"
285 - " <data name=\"StackTrace\" inType=\"win:UnicodeString\"/> <!-- 63 (NDF_STACK_TRACE) -->\r\n"
286 - " <data name=\"Request\" inType=\"win:UnicodeString\"/> <!-- 64 (NDF_REQUEST) -->\r\n"
287 - " <data name=\"Message\" inType=\"win:UnicodeString\"/> <!-- 65 (NDF_MESSAGE) -->\r\n"
285 + " <data name=\"Request\" inType=\"win:UnicodeString\"/> <!-- 63 (NDF_REQUEST) -->\r\n"
286 + " <data name=\"Message\" inType=\"win:UnicodeString\"/> <!-- 64 (NDF_MESSAGE) -->\r\n"
287 " </template>\r\n"
288 " </templates>\r\n"
289 "\r\n"