Browse Source

logs reduction

PascalCoin 6 years ago
parent
commit
c568cedcb4
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/core/UAccounts.pas
  2. 2 2
      src/core/UTCPIP.pas

+ 1 - 1
src/core/UAccounts.pas

@@ -1970,7 +1970,7 @@ begin
       // Remove ONLY if there is no subchain based on my snapshots!
       // Remove ONLY if there is no subchain based on my snapshots!
       While (FSnapshots.Count>FMaxSafeboxSnapshots) do begin
       While (FSnapshots.Count>FMaxSafeboxSnapshots) do begin
         Psnapshot := FSnapshots[0];
         Psnapshot := FSnapshots[0];
-        TLog.NewLog(ltdebug,Classname,Format('Deleting snapshot for block %d',[Psnapshot^.nBlockNumber]));
+        {$IFDEF HIGHLOG}TLog.NewLog(ltdebug,Classname,Format('Deleting snapshot for block %d',[Psnapshot^.nBlockNumber]));{$ENDIF}
         FSnapshots.Delete(0);
         FSnapshots.Delete(0);
         FreeAndNil( Psnapshot.oldBlocks );
         FreeAndNil( Psnapshot.oldBlocks );
         FreeAndNil( Psnapshot.newBlocks );
         FreeAndNil( Psnapshot.newBlocks );

+ 2 - 2
src/core/UTCPIP.pas

@@ -577,7 +577,7 @@ var SendBuffStream : TStream;
           End;
           End;
         end;
         end;
       until (last_bytes_read<sizeof(ReceiveBuffer)) Or (Terminated) Or (Not FBufferedNetTcpIpClient.Connected);
       until (last_bytes_read<sizeof(ReceiveBuffer)) Or (Terminated) Or (Not FBufferedNetTcpIpClient.Connected);
-      If total_read>0 then TLog.NewLog(ltdebug,ClassName,Format('Received %d bytes. Buffer length: %d bytes',[total_read,total_size]));
+      {$IFDEF HIGHLOG}If total_read>0 then TLog.NewLog(ltdebug,ClassName,Format('Received %d bytes. Buffer length: %d bytes',[total_read,total_size]));{$ENDIF}
     end else begin
     end else begin
       if FBufferedNetTcpIpClient.SocketError<>0 then FBufferedNetTcpIpClient.Disconnect;
       if FBufferedNetTcpIpClient.SocketError<>0 then FBufferedNetTcpIpClient.Disconnect;
     end;
     end;
@@ -597,7 +597,7 @@ var SendBuffStream : TStream;
     if (SendBuffStream.Size>0) then begin
     if (SendBuffStream.Size>0) then begin
       SendBuffStream.Position := 0;
       SendBuffStream.Position := 0;
       FBufferedNetTcpIpClient.SendStream(SendBuffStream);
       FBufferedNetTcpIpClient.SendStream(SendBuffStream);
-      TLog.NewLog(ltdebug,ClassName,Format('Sent %d bytes',[SendBuffStream.Size]));
+      {$IFDEF HIGHLOG}TLog.NewLog(ltdebug,ClassName,Format('Sent %d bytes',[SendBuffStream.Size]));{$ENDIF}
       SendBuffStream.Size := 0;
       SendBuffStream.Size := 0;
     end;
     end;
   end;
   end;