Minimal working sample: A Form with two buttons and one eventlog.
Code (change $Username):
procedure TForm1.Button1Click(Sender: TObject);
begin
EventLog1.LogType := ltFile;
EventLog1.FileName := 'C:\users\$USERNAME\Desktop\Test.log';
EventLog1.Active := True;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
EventLog1.Debug('This is a test.');
end;
Click first on Button1, then on Button2. Have fun.