Old Write* to LogI and LogException

This commit is contained in:
Daniele Teti 2024-07-09 23:22:26 +02:00
parent c420be5f24
commit d5156646ea
2 changed files with 7 additions and 7 deletions

View File

@ -26,7 +26,7 @@ procedure RunServer(APort: Integer);
var
LServer: TIdHTTPWebBrokerBridge;
begin
Writeln('** DMVCFramework Server ** build ' + DMVCFRAMEWORK_VERSION);
LogI('** DMVCFramework Server ** build ' + DMVCFRAMEWORK_VERSION);
LServer := TIdHTTPWebBrokerBridge.Create(nil);
try
@ -35,7 +35,7 @@ begin
LServer.MaxConnections := 0;
LServer.ListenQueue := 200;
LServer.Active := True;
Write('CTRL+C to Quit');
LogI('CTRL+C to Quit');
WaitForTerminationSignal;
finally
LServer.Free;
@ -55,7 +55,7 @@ begin
RunServer(8080);
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
LogException(E, 'Shutdown');
end;
end.

View File

@ -33,7 +33,7 @@ var
LCmd: string;
lURL: string;
begin
Writeln('** DMVCFramework Server ** build ' + DMVCFRAMEWORK_VERSION);
LogI('** DMVCFramework Server ** build ' + DMVCFRAMEWORK_VERSION);
LCmd := 'start';
if ParamCount >= 1 then
LCmd := ParamStr(1);
@ -52,9 +52,9 @@ begin
http://ww2.indyproject.org/docsite/html/frames.html?frmname=topic&frmfile=index.html }
LServer.ListenQueue := 200;
lURL := Format('http://localhost:%d', [APort]);
Writeln('SWAGGER UI available at ', lURL);
LogI('SWAGGER UI available at ' + lURL);
LServer.Active := True;
Write('CTRL+C to Quit');
LogI('CTRL+C to Quit');
{$IF Defined(MSWINDOWS)}
ShellExecute(0, nil, PChar(lURL), nil, nil, SW_SHOWNOACTIVATE);
{$ENDIF}
@ -74,7 +74,7 @@ begin
RunServer(8080);
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
LogException(E, E.Message);
end;
end.