Nexus API Reference

FileHandler
in package
implements Handler

Read onlyYes
FinalYes
Tags
psalm-api

Append-mode file handler. Each handle() call opens, locks with flock(EX), writes one line, flushes, unlocks, and closes. This is safe across multiple processes (Swoole worker mode) and threads (Swoole 6 thread mode) at the cost of an open/close per record.

For very high write rates, prefer one handler per writer or use a different transport (syslog, fluent-bit, etc) — file logging with per-write fopen is fine for typical app traffic and standard practice for monolog-style file sinks.

Table of Contents

Interfaces

Handler

Methods

__construct()  : mixed
handle()  : void

Methods


        
On this page

Search results