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: log_test.go
    path of file: ./repos/azure-sdk-for-go/sdk/azcore/log
    
    the code of the file until where you have to start completion: //go:build go1.18
// +build go1.18

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed
    
func TestLoggingDefault(t *testing.T) {
	// ensure logging with nil listener doesn't fail
	SetListener(nil)
	log.Write(EventRequest, "this should work just fine")

	testlog := map[Event]string{}
	SetListener(func(cls Event, msg string) {
		testlog[cls] = msg
	})
	const req = "this is a request"
	log.Write(EventRequest, req)
	const resp = "this is a response: %d"
	log.Writef(EventResponse, resp, http.StatusOK)
	if l := len(testlog); l != 2 {
		t.Fatalf("unexpected log entry count: %d", l)
	}
	if testlog[EventRequest] != req {
		t.Fatalf("unexpected log request: %s", testlog[EventRequest])
	}
	if testlog[EventResponse] != fmt.Sprintf(resp, http.StatusOK) {
		t.Fatalf("unexpected log response: %s", testlog[EventResponse])
	}
}