Allow workers to log to the log
commita39467a476022018dd96ae01aa5f276d8264c86e
authorGabe Levi <gabe@fb.com>
Fri, 13 Oct 2017 18:24:50 +0000 (13 11:24 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 13 Oct 2017 18:54:14 +0000 (13 11:54 -0700)
tree2d94837f52488d31a6dc4ff796e755eb9ff2f7ad
parent2bb8c96654f51f815b4b4900f2962482db2fb398
Allow workers to log to the log

Summary:
Currently `Hh_logger` will log to both stderr and to the log
file when called on the master process. However, when called by a
worker, it only logs to stderr. This diff allows workers to log to the
log as well.

"But Gabe, can't workers race and you end up with interlaced output in
the log?" Yes. It's possible. But that's already possible with stderr.
And as long as our workers aren't logging that heavily, it shouldn't
really be a big problem.

I think the benefit of letting workers log will outweigh the danger

Reviewed By: samwgoldman

Differential Revision: D6048505

fbshipit-source-id: b2f397ed864cf6c3fb43a9785df11baf3635ec71
hphp/hack/src/utils/hh_logger.ml