You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: syslog_windows.go
    path of file: ./repos/AdGuardHome/internal/aghos
    
    the code of the file until where you have to start completion: //go:build windows

package aghos

import (
	"str
    
func configureSyslog(serviceName string) error {
	// Note that the eventlog src is the same as the service name
	// Otherwise, we will get "the description for event id cannot be found" warning in every log record

	// Continue if we receive "registry key already exists" or if we get
	// ERROR_ACCESS_DENIED so that we can log without administrative permissions
	// for pre-existing eventlog sources.
	if err := eventlog.InstallAsEventCreate(serviceName, eventlog.Info|eventlog.Warning|eventlog.Error); err != nil {
		if !strings.Contains(err.Error(), "registry key already exists") && err != windows.ERROR_ACCESS_DENIED {
			return err
		}
	}
	el, err := eventlog.Open(serviceName)
	if err != nil {
		return err
	}

	log.SetOutput(&eventLogWriter{el: el})
	return nil
}