Skip to content

[#23][#65] Log to STDOUT, Parent PID, docker debug

Sam Habiel requested to merge shabiel/YDB-Web-Server:mws23-65 into master
  • The bulk of the work was done to change logging from into a global to stdout. The tests start the server with a file for stdout (/tmp/sim-stdout), but the simulation doesn't work perfectly, as lines seem to be randomly added or missing. So I got what I can working; I manually checked things so that they looked good on the screen.
  • Docker run as a debug option, which will let you launch the M debugger and step through the code
  • Parent PID is now passed down to the child process, and is surfaced within the /ping endpoint.

Log looks like this by default:

$ docker run --rm -it -p 9080:9080 mws server
Starting Server at port 9080
::ffff:172.17.0.1 - - [02/SEP/2022 07:41:25 PM] Starting Child at PID 28 from parent 1
::ffff:172.17.0.1 - - [02/SEP/2022 07:41:25 PM] GET / HTTP/1.1
::ffff:172.17.0.1 - - [02/SEP/2022 07:41:27 PM] GET /r/%25webapi HTTP/1.1
::ffff:172.17.0.1 - - [02/SEP/2022 07:41:37 PM] Disconnect/Halt 28

Merge request reports