Configuration value logging replaced with array variant instead of varadic event_provider::write() method for performance reasons

This commit is contained in:
Simon Rozman 2016-10-25 13:04:12 +02:00
parent 094fce2b2f
commit d5870f1252

View File

@ -147,7 +147,12 @@ namespace eap
/// ///
inline void log_config(_In_z_ LPCWSTR name, _In_z_ LPCWSTR value) const inline void log_config(_In_z_ LPCWSTR name, _In_z_ LPCWSTR value) const
{ {
m_ep.write(&EAPMETHOD_TRACE_EVT_CFG_VALUE_UNICODE_STRING, winstd::event_data(name), winstd::event_data(value), winstd::event_data::blank); EVENT_DATA_DESCRIPTOR desc[] = {
winstd::event_data(name ),
winstd::event_data(value)
};
m_ep.write(&EAPMETHOD_TRACE_EVT_CFG_VALUE_UNICODE_STRING, _countof(desc), desc);
} }
/// ///
@ -191,7 +196,12 @@ namespace eap
/// ///
inline void log_config(_In_z_ LPCWSTR name, _In_ bool value) const inline void log_config(_In_z_ LPCWSTR name, _In_ bool value) const
{ {
m_ep.write(&EAPMETHOD_TRACE_EVT_CFG_VALUE_BOOL, winstd::event_data(name), winstd::event_data((int)value), winstd::event_data::blank); EVENT_DATA_DESCRIPTOR desc[] = {
winstd::event_data( name ),
winstd::event_data((int)value)
};
m_ep.write(&EAPMETHOD_TRACE_EVT_CFG_VALUE_BOOL, _countof(desc), desc);
} }
/// ///