Lines Matching refs:stream
35 protected $stream; variable in Monolog\\Handler\\StreamHandler
48 …* @param resource|string $stream If a missing path can't be created, an UnexpectedValueExc…
54 …public function __construct($stream, $level = Logger::DEBUG, bool $bubble = true, ?int $filePermis… argument
71 if (is_resource($stream)) {
72 $this->stream = $stream;
74 stream_set_chunk_size($this->stream, $this->streamChunkSize);
75 } elseif (is_string($stream)) {
76 $this->url = Utils::canonicalizePath($stream);
90 if ($this->url && is_resource($this->stream)) {
91 fclose($this->stream);
93 $this->stream = null;
104 return $this->stream;
130 if (!is_resource($this->stream)) {
138 $stream = fopen($url, 'a');
143 if (!is_resource($stream)) {
144 $this->stream = null;
148 stream_set_chunk_size($stream, $this->streamChunkSize);
149 $this->stream = $stream;
152 $stream = $this->stream;
153 if (!is_resource($stream)) {
159 flock($stream, LOCK_EX);
162 $this->streamWrite($stream, $record);
165 flock($stream, LOCK_UN);
171 * @param resource $stream
176 protected function streamWrite($stream, array $record): void argument
178 fwrite($stream, (string) $record['formatted']);
188 private function getDirFromStream(string $stream): ?string argument
190 $pos = strpos($stream, '://');
192 return dirname($stream);
195 if ('file://' === substr($stream, 0, 7)) {
196 return dirname(substr($stream, 7));