[03:55:51] ebernhardson: I'm reviewing some debug/logger classes to improve docs and came across BufferHandler. It surprised me that we have our own subclass for that (since https://gerrit.wikimedia.org/r/229172 ). It says we use DeferredUpdates to postpone to postsend instead of the monolog default of shutdown. But... shutdown is after postsend, and defered updates themselves do make use of logging which presumably means we flush twice? I'm [03:55:51] curious if that's intended and whether it overall stil makes sense - ie. what would regress if we remove our customisation? [03:56:20] I wonder if this explains ref T214734 [03:56:21] T214734: Post-send work sometimes fatals at "Error: The UdpSocket to 127.0.0.1:10514 has been closed" (esp. mwdebug hosts) - https://phabricator.wikimedia.org/T214734 [15:00:42] Krinkle: hmmm, not sure looking [15:16:15] Krinkle: sadly my memoy of 8 years ago is not that strong. That was the age of hhvm, I have some memory that hhvm did things differently. I think they didn't have a `register_shutdown_function`, they had `register_postsend_function` which is somehow different but i dont remember how. It seems plausible that that bit is closing the connection [15:18:16] looking at a release of monolog from that era they indeed used register_shutdown_function. I can't say for sure but i think the reason that used deferred updates was to vary between postsend or fastcgi_finish_request, since there wasn't a unified thing between hhvm and fcgi [20:58:30] ebernhardson: yeah, that'll be the reason for using deferred. but I can't think of why we wanted to do anything like that in the first place. shutdown is always shutdown and has always been after any form of postsend or finish_request. [21:00:41] it;s roughly flush -> fastcgi_finish_request (if supported) -> rest of execution is post-send -> (HHVM-only) trigger callbacks scheduled via register_postsend_function -> (PHP builtin) trigger callbacks for register_shutdown_function -> destructors. [21:11:09] TimStarling: raw content in scripts is pretty sweet for debugging ease :) ref T348280 [21:11:09] T348280: Source map invalid for multi-line backtick strings (breaks when debugging MultimediaViewer extension) - https://phabricator.wikimedia.org/T348280