n4af / TR4W

TRLOG 4 Windows free amateur radio logging application
GNU General Public License v3.0
19 stars 6 forks source link

When a user adds a NOTE, add this DEBUG LOG #564

Closed ny4i closed 2 years ago

ny4i commented 2 years ago

To aid in debugging, when a user enters a note, log it into the debug log as INFO. This allows a user to place notes into the log to aid debugging.

ny4i commented 2 years ago

In MainUnnit, procedure trt4w_add_note_in_log, add the bolderd line to this procedure:

procedure tr4w_add_note_in_log;
var
  s                                     : ShortString;
  i                                     : integer;
begin
  tInputDialogLowerCase := True;
  s := QuickEditResponse(TC_NOTE, 80);
  i := length(s);
**logger.info('******* User added note: [%s]',s);**
  if i = 0 then Exit
  else if i > 80 then i := 80;
  Windows.ZeroMemory(@TempRXData, SizeOf(ContestExchange));
  TempRXData.ceRecordKind := rkNote;
  Windows.MoveMemory(@TempRXData.Prefix, @s[1], i);
  AddRecordToLogAndSendToNetwork(TempRXData);
end;