[PR][php-src][#1076][PHP-5.6] - Fix long messages to stdout/stderr getting truncated
| From: | noreply@php.net | Date: | Tue, 24 Feb 2015 11:36:31 +0000 |
| Subject: | [PR][php-src][#1076][PHP-5.6] - Fix long messages to stdout/stderr getting truncated | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-2476@lists.php.net to get a copy of this message | ||
You can view the Pull Request on github:
https://github.com/php/php-src/pull/1076
Pull Request Description:
The maximum zlog message length is 1024 including timestamp et cetera.
With very long messages over 1024 characters, these get wrapped into multiple chunks correctly, but
then the "WARNING: child blah said into blah" gets added and the zlog call truncates the
messages using "..." at the end, resulting in a couple dozen bytes getting lost.
This change calculates the length at which wrapping needs to occur correctly.
To reproduce, log a long message to
stderr, e.g. a bit of Shakespeare:
```
file_put_contents('php://stderr', "If it were done when 'tis done, then
'twere well // It were done quickly. If the assassination // Could trammel up the consequence,
and catch, // With his surcease, success; that but this blow // Might be the be-all and the
end-all--here, // But here, upon this bank and shoal of time,-- // We'd jump the life to come.
But in these cases // We still have judgement here; that we but teach // Bloody instructions, which
being taught, return // To plague the inventor: this even-handed justice // Commends the ingredients
of our poison'd chalice // To our own lips. He's here in double trust: // First, as I am
his kinsman and his subject, // Strong both against the deed: then, as his host, // Who should
against his murderer shut the door, // Not bear the knife myself. Besides, this Duncan // Hath borne
his faculties so meek, hath been // So clear in his great office, that his virtues // Will plead
like angels, trumpet-tongued, against // The deep damnation of his taking-off: // And pity, like a
naked new-born babe, // Striding the blast, or heaven's cherubin, hors'd // Upon the
sightless couriers of the air, // Shall blow the horrid deed in every eye, // That tears shall drown
the wind.--I have no spur // To prick the sides of my intent, but only // Vaulting ambition, which
o'erleaps itself, // And falls on the other. // Is this a dagger which I see before me, // The
handle toward my hand? Come, let me clutch thee:-- // I have thee not, and yet I see thee still. //
Art thou not, fatal vision, sensible // To feeling as to sight? or art thou but // A dagger of the
mind, a false creation, // Proceeding from the heat-oppressed brain? // I see thee yet, in form as
palpable // As this which now I draw. // Thou marshall'st me the way that I was going; // And
such an instrument I was to use. // Mine eyes are made the fools o' the other senses, // Or
else worth all the rest: I see thee still; // And on thy blade and dudgeon gouts of blood, // Which
was not so before.--There's no such thing: // It is the bloody business which informs // Thus
to mine eyes.--Now o'er the one half-world // Nature seems dead, and wicked dreams abuse // The
curtain'd sleep; now witchcraft celebrates // Pale Hecate's offerings; and wither'd
murder, // Alarum'd by his sentinel, the wolf, // Whose howl's his watch, thus with his
stealthy pace, // With Tarquin's ravishing strides, towards his design // Moves like a
ghost.--Thou sure and firm-set earth, // Hear not my steps, which way they walk, for fear // Thy
very stones prate of my whereabout, // And take the present horror from the time, // Which now suits
with it.--Whiles I threat, he lives; // Words to the heat of deeds too cold breath gives. //
");
```