From a362e7d9c664b8ad7e51f840ed4db48426dee03b Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Thu, 20 Dec 2012 18:32:56 +0100 Subject: [PATCH] Avoid calling ANY.print, prefer io.error.put_string Fixed obsolete calls. --- .../connectors/nino/src/wgi_nino_connector.e | 2 +- .../stream/wgi_chunked_input_stream.e | 16 ++++++++-------- .../connector/nino/wsf_nino_service_launcher.e | 8 ++++++-- .../wsf/router/wsf_router_agent_iterator.e | 8 ++++---- library/server/wsf/session/wsf_cookie_session.e | 2 +- .../server/wsf/session/wsf_fs_session_manager.e | 2 +- 6 files changed, 21 insertions(+), 17 deletions(-) diff --git a/library/server/ewsgi/connectors/nino/src/wgi_nino_connector.e b/library/server/ewsgi/connectors/nino/src/wgi_nino_connector.e index 4fe70957..81ed0265 100644 --- a/library/server/ewsgi/connectors/nino/src/wgi_nino_connector.e +++ b/library/server/ewsgi/connectors/nino/src/wgi_nino_connector.e @@ -107,7 +107,7 @@ feature -- Server create {WGI_NINO_HANDLER} l_http_handler.make_with_callback (server, Current) if configuration.is_verbose then if attached base as l_base then - print ("Base=" + l_base + "%N") + io.error.put_string ("Base=" + l_base + "%N") end end server.setup (l_http_handler) diff --git a/library/server/ewsgi/specification/stream/wgi_chunked_input_stream.e b/library/server/ewsgi/specification/stream/wgi_chunked_input_stream.e index de2b07c3..9068ba46 100644 --- a/library/server/ewsgi/specification/stream/wgi_chunked_input_stream.e +++ b/library/server/ewsgi/specification/stream/wgi_chunked_input_stream.e @@ -187,7 +187,7 @@ feature {NONE} -- Parser l_input: like input do debug ("wgi") - print (" Read chunk data ("+ last_chunk_size.out +") %N") + io.error.put_string (" Read chunk data ("+ last_chunk_size.out +") %N") end l_input := input l_input.read_string (last_chunk_size) @@ -207,7 +207,7 @@ feature {NONE} -- Parser l_input: like input do debug ("wgi") - print (" Read chunk size: ") + io.error.put_string (" Read chunk size: ") end l_input := input @@ -218,7 +218,7 @@ feature {NONE} -- Parser loop c := l_input.last_character debug ("wgi") - print (c.out) + io.error.put_string (c.out) end inspect c when '%R' then @@ -247,7 +247,7 @@ feature {NONE} -- Parser tmp_hex_chunk_size.wipe_out debug ("wgi") - print ("%N Chunk size = " + last_chunk_size.out + "%N") + io.error.put_string ("%N Chunk size = " + last_chunk_size.out + "%N") end end @@ -258,7 +258,7 @@ feature {NONE} -- Parser do l_input := input debug ("wgi") - print (" Reading extension chunk ") + io.error.put_string (" Reading extension chunk ") end create s.make_empty from @@ -268,7 +268,7 @@ feature {NONE} -- Parser l_input.last_character = '%R' loop debug ("wgi") - print (l_input.last_character) + io.error.put_character (l_input.last_character) end l_input.read_character s.append_character (l_input.last_character) @@ -293,7 +293,7 @@ feature {NONE} -- Parser l_input := input if not l_input.end_of_input then debug ("wgi") - print (" Reading trailer ") + io.error.put_string (" Reading trailer ") end from l_line_size := 1 -- Dummy value /= 0 @@ -309,7 +309,7 @@ feature {NONE} -- Parser loop l_line_size := l_line_size + 1 debug ("wgi") - print (l_input.last_character) + io.error.put_character (l_input.last_character) end l_input.read_character s.append_character (l_input.last_character) diff --git a/library/server/wsf/connector/nino/wsf_nino_service_launcher.e b/library/server/wsf/connector/nino/wsf_nino_service_launcher.e index fc78a00a..1ee7f150 100644 --- a/library/server/wsf/connector/nino/wsf_nino_service_launcher.e +++ b/library/server/wsf/connector/nino/wsf_nino_service_launcher.e @@ -88,8 +88,12 @@ feature -- Execution conn.configuration.set_is_verbose (verbose) debug ("nino") if verbose then - print ("Example: start a Nino web server on port " + port_number.out + - ", %Nand reply Hello World for any request such as http://localhost:" + port_number.out + "/" + base_url + "%N") + io.error.put_string ("Launching Nino web server on port " + port_number.out) + if attached server_name as l_name then + io.error.put_string ("%N http://" + l_name + ":" + port_number.out + "/" + base_url + "%N") + else + io.error.put_string ("%N http://localhost:" + port_number.out + "/" + base_url + "%N") + end end end if attached server_name as l_server_name then diff --git a/library/server/wsf/router/wsf_router_agent_iterator.e b/library/server/wsf/router/wsf_router_agent_iterator.e index c44d4ebc..32884870 100644 --- a/library/server/wsf/router/wsf_router_agent_iterator.e +++ b/library/server/wsf/router/wsf_router_agent_iterator.e @@ -22,10 +22,10 @@ feature {NONE} -- Initialization default_create do Precursor - create on_router_actions.make - create on_item_actions.make - create on_mapping_actions.make - create on_handler_actions.make + create on_router_actions + create on_item_actions + create on_mapping_actions + create on_handler_actions end feature -- Actions diff --git a/library/server/wsf/session/wsf_cookie_session.e b/library/server/wsf/session/wsf_cookie_session.e index 02551985..cd8b2f32 100644 --- a/library/server/wsf/session/wsf_cookie_session.e +++ b/library/server/wsf/session/wsf_cookie_session.e @@ -151,7 +151,7 @@ feature {NONE} -- Storage build end rescue - print ("ouch") + io.error.put_string ("Error while loading Cookie session...!%N") end build diff --git a/library/server/wsf/session/wsf_fs_session_manager.e b/library/server/wsf/session/wsf_fs_session_manager.e index 459fe911..8a00f904 100644 --- a/library/server/wsf/session/wsf_fs_session_manager.e +++ b/library/server/wsf/session/wsf_fs_session_manager.e @@ -52,7 +52,7 @@ feature -- Access end rescue debug - print ("Error occurred in " + generator) + io.error.put_string ("Error occurred in " + generator) end end