public class RuntimeLogSink extends Object
RuntimeLogSink attaches a root Handler that records all log messages Level.INFO or higher as a RuntimePb.UPResponse.RuntimeLogLine attached to the current RuntimePb.UPResponse.
TODO: This class is designed to be used in a single-threaded runtime. If multiple requests are executing in a single process in parallel, their messages will currently overlap. If we want to support this configuration in the future we should do something slightly smarter here (however, we don't want to limit logs to only the thread serving the request).
| Constructor and Description |
|---|
RuntimeLogSink(long maxSizeBytes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHandlerToRootLogger() |
void |
flushLogs(MutableUpResponse response) |
public void addHandlerToRootLogger()
public void flushLogs(MutableUpResponse response)
Copyright © 2022. All rights reserved.