1--TEST--
2FPM: Buffered worker output decorated log with limit 1050 with 2048 msg
3--SKIPIF--
4<?php include "skipif.inc"; ?>
5--FILE--
6<?php
7
8require_once "tester.inc";
9
10$cfg = <<<EOT
11[global]
12error_log = {{FILE:LOG}}
13log_limit = 1050
14log_buffering = yes
15[unconfined]
16listen = {{ADDR}}
17pm = dynamic
18pm.max_children = 5
19pm.start_servers = 1
20pm.min_spare_servers = 1
21pm.max_spare_servers = 3
22catch_workers_output = yes
23decorate_workers_output = yes
24EOT;
25
26$code = <<<EOT
27<?php
28file_put_contents('php://stderr', str_repeat('a', 2048) . "\n");
29EOT;
30
31$tester = new FPM\Tester($cfg, $code);
32$tester->start();
33$tester->expectLogStartNotices();
34$tester->request()->expectEmptyBody();
35$tester->terminate();
36$tester->expectLogMessage('a', 1050, 2048);
37$tester->close();
38
39?>
40Done
41--EXPECT--
42Done
43--CLEAN--
44<?php
45require_once "tester.inc";
46FPM\Tester::clean();
47?>
48