Debug/3 messages reverse lookup

SWI-Prolog has many debug/3 included in the source code with many topics related to http.

Often times we have the topic message(s) but would like to know which debug/3 topic created the message or would just like to see examples of messages for each topic.

While this is not a complete list it is a start.
Note: The list is based on a post in this forum provided by @peter.ludemann. If you know the post please edit this and add the link, this post is a wiki.



% [Thread http@8080] Waiting for connection
% [Thread http@8080] Waiting for connection
% [Thread httpd@8080_5] Opened connection from ip(127,0,0,1)
% [Thread httpd@8080_1] Closing connection from ip(127,0,0,1)

:- debug(http(connection)).

% -----------------

% % [Thread httpd@8080_2] First line: GET / HTTP/1.1
% % [Thread httpd@8080_2] Header =
% Host: localhost:8080
% Connection: keep-alive
% Pragma: no-cache
% Cache-Control: no-cache
% sec-ch-ua: "Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110"
% sec-ch-ua-mobile: ?0
% sec-ch-ua-platform: "Windows"
% Upgrade-Insecure-Requests: 1
% User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
% Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
% Sec-Fetch-Site: none
% Sec-Fetch-Mode: navigate
% Sec-Fetch-User: ?1
% Sec-Fetch-Dest: document
% Accept-Encoding: gzip, deflate, br
% Accept-Language: en-US,en;q=0.9

% % [Thread httpd@8080_2] Field: [host(localhost),port(8080),connection('keep-alive'),pragma('no-cache'),cache_control('no-cache'),sec_ch_ua('"Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110"'),sec_ch_ua_mobile('?0'),sec_ch_ua_platform('"Windows"'),upgrade_insecure_requests('1'),user_agent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36'),accept([media(text/html,[],1.0,[]),media(application/'xhtml+xml',[],1.0,[]),media(image/avif,[],1.0,[]),media(image/webp,[],1.0,[]),media(image/apng,[],1.0,[]),media(application/xml,[],0.9,[]),media(_3504/_3506,[],0.8,[]),media(application/'signed-exchange',[v=b3],0.7,[])]),sec_fetch_site(none),sec_fetch_mode(navigate),sec_fetch_user('?1'),sec_fetch_dest(document),accept_encoding('gzip, deflate, br'),accept_language('en-US,en;q=0.9')]
% % [Thread httpd@8080_4] First line: GET /time.js HTTP/1.1
% % [Thread httpd@8080_4] Header =
% Host: localhost:8080
% Connection: Upgrade
% Pragma: no-cache
% Cache-Control: no-cache
% User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
% Upgrade: websocket
% Origin: http://localhost:8080
% Sec-WebSocket-Version: 13
% Accept-Encoding: gzip, deflate, br
% Accept-Language: en-US,en;q=0.9
% Sec-WebSocket-Key: KBr8S9K6R9hMSLcGbDMs5g==
% Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits

% % [Thread httpd@8080_3] Field: [host(localhost),port(8080),connection('Upgrade'),pragma('no-cache'),cache_control('no-cache'),user_agent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36'),upgrade(websocket),origin('http://localhost:8080'),sec_websocket_version('13'),accept_encoding('gzip, deflate, br'),accept_language('en-US,en;q=0.9'),sec_websocket_key('KBr8S9K6R9hMSLcGbDMs5g=='),sec_websocket_extensions('permessage-deflate; client_max_window_bits')]

:- debug(http(header)).

% -----------------

% [Thread httpd@8080_5] Waiting for keep-alive ...
% [Thread httpd@8080_5]         re-using keep-alive connection
% [Thread httpd@8080_4] Waiting for keep-alive ...
% [Thread httpd@8080_4]         Timeout on keep-alive connection

:- debug(http(keep_alive)).

% -----------------

% root('.') (/) --> /
% [Thread httpd@8080_5] root('.') (/) --> /
% [Thread httpd@8080_5] root('time.js') (/) --> '/time.js'
% [Thread httpd@8080_5] root(ws) (/) --> '/ws'

:- debug(http_path).

% -----------------

% [Thread httpd@8080_2] [1] get / ...
% [Thread httpd@8080_2] [1] 200 file(text/html,c:/users/groot/projects/swi-prolog learning websockets/17 example(time - websocket - button pull time - push time every second - echo - single websocket with request argument)/index.html); 573 bytes
% [Thread httpd@8080_4] [2] get /time.js ...
% [Thread httpd@8080_4] [2] 200 file(text/javascript,c:/users/groot/projects/swi-prolog learning websockets/17 example(time - websocket - button pull time - push time every second - echo - single websocket with request argument)/time.js); 4,451 bytes
% [Thread httpd@8080_1] [3] get /ws ...
% [Thread 9] [3] 101 switching_protocols(websocket:open_websocket(server:ws,null,[guarded(false)]),[header([upgrade(websocket),connection(Upgrade),sec_websocket_accept(y/NGA/H3QKM+Yx2SarHWeytWqpo=)])]); 0 bytes

:- debug(http(request)).

% -----------------

% [Thread httpd@8080_1] New worker
% [Thread httpd@8080_2] New worker
% [Thread httpd@8080_4] New worker
% [Thread httpd@8080_5] New worker
% [Thread httpd@8080_3] New worker
% [Thread http@8080] 5 waiting for work; ok
% [Thread http@8080] 4 waiting for work; ok
% [Thread httpd@8080_2] 3 waiting for work; ok
% [Thread httpd@8080_1] 3 waiting for work; ok
% [Thread http@8080] 3 waiting for work; ok
% [Thread http@8080] 2 waiting for work; ok

:- debug(http(scheduler)).

% -----------------

% [Thread httpd@8080_5] Running server goal server:http_dispatch on <stream>(0000021145b09ea0) -> <stream>(0000021145b0a3f0)
% [Thread httpd@8080_3] Running server goal server:http_dispatch on <stream>(0000021145b08960) -> <stream>(0000021145b0a720)
% [Thread httpd@8080_2] Running server goal server:http_dispatch on <stream>(0000021145b09ea0) -> <stream>(0000021145b0a3f0)
% [Thread httpd@8080_4] Running server goal server:http_dispatch on <stream>(0000021145b0bd70) -> <stream>(0000021145b0b3e0)
% [Thread httpd@8080_5] Running server goal server:http_dispatch on <stream>(0000021145b0a1d0) -> <stream>(0000021145b0a940)

:- debug(http(server)).

% -----------------

% [Thread httpd@8080_3] Handler spawned to thread <thread>(9,000002738dba80e0)

:- debug(http(spawn)).

% -----------------

% [Thread httpd@8080_1] Waiting for a job ...
% [Thread httpd@8080_4] Waiting for a job ...
% [Thread httpd@8080_1] Got job tcp_client(<socket>(000002456fb1b6f0),server:http_dispatch,ip(127,0,0,1))
% [Thread httpd@8080_4] Got job tcp_client(<socket>(000002456fb1bdb0),server:http_dispatch,ip(127,0,0,1))
% [Thread httpd@8080_3] Waiting for a job ...
% [Thread httpd@8080_3] Got job requeue(<stream>(000002456fcf3910),<stream>(000002456fcf22c0),server:http_dispatch,[protocol(http),peer(ip(127,0,0,1)),pool(client('httpd@8080',server:http_dispatch,<stream>(000002456fcf3910),<stream>(000002456fcf22c0)))])
% [Thread httpd@8080_3] Waiting for a job ...
% [Thread httpd@8080_3] Got job requeue(<stream>(000002456fcf3910),<stream>(000002456fcf22c0),server:http_dispatch,[pool(client('httpd@8080',server:http_dispatch,<stream>(000002456fcf3910),<stream>(000002456fcf22c0))),peer(ip(127,0,0,1)),protocol(http)])
% [Thread httpd@8080_2] Waiting for a job ...
% [Thread httpd@8080_2] Got job tcp_client(<socket>(000002456fcf7f10),server:http_dispatch,ip(127,0,0,1))
% [Thread httpd@8080_1] Waiting for a job ...
% [Thread httpd@8080_1] Got job tcp_client(<socket>(000002456fcf77d0),server:http_dispatch,ip(127,0,0,1))

:- debug(http(worker)).

% -----------------

% [Thread 9] ws_receive(<stream>(00000239e02134a0,00000239e0215ae0)): OpCode=1, RSV=0
% [Thread 9] ws_receive(<stream>(00000239e02134a0,00000239e0215ae0)) --> websocket{data:_2494{type:"server_time_pull"},format:json,opcode:text}

:- debug(websocket).

% -----------------

% [Thread 9] Websocket request: _416{extensions:'permessage-deflate; client_max_window_bits',key:'Mllwg2yUWIN9nIP/xMJ8ug==',origin:'http://localhost:8080',version:'13'}
% [Thread 9] Subprotocol: null

:- debug(websocket(open)).

% -----------------

% [Thread 9] <stream>(0000022bd3d93590,0000022bd3d93ae0): closed output
% [Thread 12] <stream>(0000022bd3d75820,0000022bd3d762c0): closed output
% [Thread 12] Input stream of <stream>(0000022bd3d75820,0000022bd3d762c0) already closed
% [Thread 9] Input stream of <stream>(0000022bd3d93590,0000022bd3d93ae0) already closed

:- debug(websocket(close)).

Here are other SWI-Prolog topics that need sample messages.

% :- debug(http_authenticate).
% :- debug(http(authenticate)).
% :- debug(http(cookie)).
% :- debug(http(error)).
% :- debug(log).
% :- debug(redirect_log).
% :- debug(server).
% :- debug(request_json_log).
% :- debug(html(mailman)).
% :- debug(html(script)).
% :- debug(http(cgi)).
% :- debug(http(hook)).
% :- debug(http(nonce)).
% :- debug(http(open)).
% :- debug(http(proxy)).
% :- debug(http(redirect)).
% :- debug(http(send_request)).
% :- debug(http_session).
% :- debug(http_session(gc)).
% :- debug(http(transfer_encoding)).
% :- debug(json_arg).
% :- debug(post).
% :- debug(post_request).
% :- debug(proxy).