clientIdeDaemon supports HackEventLogger
commite9f108380e243c2d1c4dfc1a75536dee3b5727ed
authorLucian Wischik <ljw@fb.com>
Wed, 4 Dec 2019 06:00:27 +0000 (3 22:00 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 4 Dec 2019 06:02:47 +0000 (3 22:02 -0800)
tree459cbeec64e2b843f017fb05b8c62ac4bfe62952
parentfc13370a2dfb1a74c63bc77fb16bef471211efae
clientIdeDaemon supports HackEventLogger

Summary:
This diff adds support for HackEventLogger to clientIdeDaemon.

Prior to this diff, ClientIdeDaemon called `EventLogger.init_fake ()` inside set_up_hh_logger_for_client_ide_server, which is called in response to receiving the Initialize_from_saved_state message. This had two effects:

(1) All HackEventLogger telemetry was ignored

(2) Any attempt at HackEventLogger before the Initialize_from_saved_state message was received, would fail.

This diff makes it initialize properly, right at the very start. That way, HackEventLogger will work.

This diff also calls into EventLogger.flush periodically, which is also needed by HackEveentLogger.

Reviewed By: arxanas

Differential Revision: D18755935

fbshipit-source-id: 10a0fbd1c86be6700209cc24fed55f2d60b4562d
hphp/hack/src/client/ide_service/clientIdeDaemon.ml
hphp/hack/src/stubs/logging/common/dune
hphp/hack/src/stubs/logging/common/eventLoggerLwt.ml [new file with mode: 0644]
hphp/hack/src/stubs/logging/hackEventLogger.ml