class Logger

Constants

DEFAULT_WRITE_TIMEOUT_SECONDS

How long a write may wait for the renderer to accept output.

This must remain well above the public render interval.

Properties

protected RuntimeException|null $transportFailure

The first transport failure encountered while writing.

protected string $identifier

The identifier retained for Laravel-compatible construction and subclass state.

Methods

__construct(string $identifier, null|resource $socket = null, float $writeTimeout = self::DEFAULT_WRITE_TIMEOUT_SECONDS)

Create a new Logger instance.

void
line(string $message)

Log a line to the process log.

void
partial(string $chunk)

Append a chunk of text to the current partial output.

void
commitPartial()

Commit the accumulated partial text and start fresh.

void
success(string $message)

Log a success message to the process log.

void
warning(string $message)

Log a warning message to the process log.

void
error(string $message)

Log an error message to the process log.

void
label(string $message)

Update the label of the process log.

void
subLabel(string $message)

Update the sub-label of the process log. Pass an empty string to clear.

void
write(string $message, string|null $type = null)

Write a message to the socket.

transportFailure()

Get the first transport failure encountered while writing.

Details

at line 34
__construct(string $identifier, null|resource $socket = null, float $writeTimeout = self::DEFAULT_WRITE_TIMEOUT_SECONDS)

Create a new Logger instance.

Parameters

string $identifier
null|resource $socket
float $writeTimeout

seconds a write may wait for the renderer to accept output

at line 45
void line(string $message)

Log a line to the process log.

Parameters

string $message

Return Value

void

at line 53
void partial(string $chunk)

Append a chunk of text to the current partial output.

Parameters

string $chunk

Return Value

void

at line 61
void commitPartial()

Commit the accumulated partial text and start fresh.

Return Value

void

at line 69
void success(string $message)

Log a success message to the process log.

Parameters

string $message

Return Value

void

at line 77
void warning(string $message)

Log a warning message to the process log.

Parameters

string $message

Return Value

void

at line 85
void error(string $message)

Log an error message to the process log.

Parameters

string $message

Return Value

void

at line 93
void label(string $message)

Update the label of the process log.

Parameters

string $message

Return Value

void

at line 101
void subLabel(string $message)

Update the sub-label of the process log. Pass an empty string to clear.

Parameters

string $message

Return Value

void

at line 109
protected void write(string $message, string|null $type = null)

Write a message to the socket.

Parameters

string $message
string|null $type

Return Value

void

at line 130
RuntimeException|null transportFailure()

Get the first transport failure encountered while writing.

Return Value

RuntimeException|null