diff --git a/samples/swagger_primer/SwaggerPrimer.dpr b/samples/swagger_primer/SwaggerPrimer.dpr index 5cdb5f62..15001fd9 100644 --- a/samples/swagger_primer/SwaggerPrimer.dpr +++ b/samples/swagger_primer/SwaggerPrimer.dpr @@ -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. diff --git a/samples/swaggerdoc_extended/SwaggerDocApiExtended.dpr b/samples/swaggerdoc_extended/SwaggerDocApiExtended.dpr index 0394c377..d5adbd0a 100644 --- a/samples/swaggerdoc_extended/SwaggerDocApiExtended.dpr +++ b/samples/swaggerdoc_extended/SwaggerDocApiExtended.dpr @@ -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.