Skip to content

Commit 1db53e9

Browse files
committed
Activate error log in WS demo.
Also add clear instruction on how to test the WebSocket part of the demo. Motivated by T416-030.
1 parent 3418ae2 commit 1db53e9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

demos/ws/ws.adb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Ada Web Server --
33
-- --
4-
-- Copyright (C) 2000-2016, AdaCore --
4+
-- Copyright (C) 2000-2020, AdaCore --
55
-- --
66
-- This is free software; you can redistribute it and/or modify it --
77
-- under terms of the GNU General Public License as published by the --
@@ -22,7 +22,8 @@
2222
with Ada.Text_IO;
2323

2424
with AWS.Config.Set;
25-
with AWS.Server;
25+
with AWS.Log;
26+
with AWS.Server.Log;
2627

2728
with WS_CB.WebSockets;
2829

@@ -35,6 +36,10 @@ begin
3536
Text_IO.Put_Line ("Kill me when you want me to stop...");
3637
Text_IO.Put_Line ("I will stop in 10 minutes anyway !");
3738

39+
Text_IO.Put_Line
40+
("For the WebSocket demo, open in browser websocket-messages-test.Html");
41+
Text_IO.Put_Line (" firefox websocket-messages-test.html");
42+
3843
AWS.Config.Set.Reuse_Address (Config, True);
3944
AWS.Config.Set.Server_Host (Config, "127.0.0.1");
4045
AWS.Config.Set.Server_Port (Config, 1234);
@@ -48,6 +53,9 @@ begin
4853
Config => Config,
4954
Callback => WS_CB.Service'Access);
5055

56+
AWS.Server.Log.Start_Error
57+
(WS_CB.WS, AWS.Log.Daily, Filename_Prefix => "tlog_error");
58+
5159
delay 10 * 60.0;
5260

5361
Text_IO.Put_Line ("ok, let's shutdown...");

0 commit comments

Comments
 (0)