Documentation

NdJson
in package
implements FormatterInterface

NDJSON (JSON Lines) formatter — one self-contained JSON object per line

Tags
category

Pop

author

Nick Sagona, III nick@popphp.org

copyright

Copyright (c) 2009-2026 Nick Sagona, III

license

https://www.popphp.org/license New BSD License

version
5.0.0

Table of Contents

Interfaces

FormatterInterface
Log formatter interface

Methods

format()  : string
Format a single log entry into a self-contained JSON object

Methods

format()

Format a single log entry into a self-contained JSON object

public format(string $level, string $message, array<string|int, mixed> $context) : string
Parameters
$level : string
$message : string
$context : array<string|int, mixed>
Return values
string

        
On this page

Search results