Logger
class Logger
Properties
| protected string | $streamBuffer | The buffer for streaming text. |
Methods
Create a new Logger instance.
Log a line to the process log.
Append a chunk of text, accumulating on the current line(s).
Commit the accumulated partial text and start fresh.
Log a success message to the process log.
Log a warning message to the process log.
Log an error message to the process log.
Update the label of the process log.
Update the sub-label of the process log. Pass an empty string to clear.
Write a message to the socket.
Prefix a message with the identifier and type.
Details
at line 14
__construct(string $identifier, null|resource $socket = null)
Create a new Logger instance.
at line 26
void
line(string $message)
Log a line to the process log.
at line 34
void
partial(string $chunk)
Append a chunk of text, accumulating on the current line(s).
at line 43
void
commitPartial()
Commit the accumulated partial text and start fresh.
at line 52
void
success(string $message)
Log a success message to the process log.
at line 60
void
warning(string $message)
Log a warning message to the process log.
at line 68
void
error(string $message)
Log an error message to the process log.
at line 76
void
label(string $message)
Update the label of the process log.
at line 84
void
subLabel(string $message)
Update the sub-label of the process log. Pass an empty string to clear.
at line 92
protected void
write(string $message, string|null $type = null)
Write a message to the socket.
at line 108
protected string
prefix(string $type, string $message)
Prefix a message with the identifier and type.