Class StreamLog
Stream Storage for Logging. Writes logs to a stream, optionally formatting it as a JSON.
Methods summary
public
|
#
__construct( array{stream?: $options = [] )
Constructs a new File Logger.
Constructs a new File Logger.
Options
stream the stream to write logs to. Defaults to php://stderr . Can be either an open resource, or a path to
write to that is accepted by file_put_contents().
json whether or not to format the log output as JSON. Defaults to false.
Parameters
- $options
- json?: bool} $options Options for the FileLog, see above.
|
public
boolean
|
#
write( string $type, string $message )
Implements writing to log files.
Implements writing to log files.
Parameters
- $type
- The type of log you are making.
- $message
- The message you want to log.
Returns
boolean success of write.
|
Properties summary
protected
string|resource
|
$_stream
|
|
protected
boolean
|
$_json
Whether or not to format the log output as JSON.
Whether or not to format the log output as JSON.
|
|