Page MenuHomePhabricator

In PhutilLogFileChannel, don't log empty messages
ClosedPublic

Authored by epriestley on Feb 16 2017, 1:50 PM.
Tags
None
Referenced Files
F14013055: D17368.id.diff
Fri, Nov 1, 11:59 PM
F13982872: D17368.diff
Sun, Oct 20, 2:36 AM
Unknown Object (File)
Oct 6 2024, 9:15 AM
Unknown Object (File)
Oct 6 2024, 9:07 AM
Unknown Object (File)
Sep 18 2024, 1:15 PM
Unknown Object (File)
Sep 5 2024, 10:53 PM
Unknown Object (File)
Aug 30 2024, 3:38 PM
Unknown Object (File)
Aug 30 2024, 5:08 AM
Subscribers
None

Details

Summary

Ref T2794. The LogFile channel is used to debug another channel by sending all the messages to a logfile.

We perform empty (zero-length) reads over nonblocking channels in various reasonable situations. Currently, these get written to the logfile as empty lines. However, they are probably never useful.

Instead, only write data if it has nonzero length.

Test Plan

After this change, debugging output from the experimental Phage stuff no longer fills up the protocol logfile with tons of empty messages.

Diff Detail

Repository
rPHU libphutil
Branch
phage2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 15660
Build 20679: Run Core Tests
Build 20678: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Feb 17 2017, 11:57 PM
This revision was automatically updated to reflect the committed changes.