martinzink commented on code in PR #1670: URL: https://github.com/apache/nifi-minifi-cpp/pull/1670#discussion_r1356644621
########## extensions/windows-event-log/CollectorInitiatedSubscription.cpp: ########## @@ -481,7 +486,7 @@ bool CollectorInitiatedSubscription::subscribe(const std::shared_ptr<core::Proce if (!EvtRender(NULL, hEvent, EvtRenderEventXml, size, 0, &used, &propertyCount)) { if (ERROR_INSUFFICIENT_BUFFER == GetLastError()) { if (used > pCollectorInitiatedSubscription->max_buffer_size_.getValue()) { - logger->log_error("Dropping event %p because it couldn't be rendered within %llu bytes.", hEvent, pCollectorInitiatedSubscription->max_buffer_size_.getValue()); + logger->log_error("Dropping event {} because it couldn't be rendered within {} bytes.", hEvent, pCollectorInitiatedSubscription->max_buffer_size_.getValue()); Review Comment: Originally it was %x (hex integer) and %p (address in hex), I did the replacements by type not by file. On closer inspection it is due to the ingenius design from microsoft. This is an event handler if everything goes according to plan or an error number if its not. I think it would be okay to print it with the default both times, but I am not that familiar with CollectorInitiatedSubscription. https://learn.microsoft.com/en-us/windows/win32/api/winevt/nc-winevt-evt_subscribe_callback > Event > > A handle to the event. The event handle is only valid for the duration of the callback function. You can use this handle with any event log function that takes an event handle (for example, [EvtRender](https://learn.microsoft.com/en-us/windows/desktop/api/winevt/nf-winevt-evtrender) or [EvtFormatMessage](https://learn.microsoft.com/en-us/windows/desktop/api/winevt/nf-winevt-evtformatmessage)). > > Do not call [EvtClose](https://learn.microsoft.com/en-us/windows/desktop/api/winevt/nf-winevt-evtclose) to close this handle; the service will close the handle when the callback returns. > > If the Action parameter is EvtSubscribeActionError, cast Event to a DWORD to access the Win32 error code. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org