Skip to content

net472_EventLogHelper.Interfaces_IRegistryReader_GetDefaultEventLogSource

dparvin edited this page Sep 10, 2025 · 1 revision

IRegistryReader.GetDefaultEventLogSource method

Attempts to determine a default event source for the specified event log.

public string GetDefaultEventLogSource(string logName, string machineName)
parameter description
logName The name of the event log (e.g., "Application", "System", or a custom log).
machineName The target machine name. Use "." for the local machine.

Return Value

The name of a registered event source, or an empty string if none are found.

Remarks

This can be used as a fallback when an explicit source name has not been provided.

See Also

Clone this wiki locally