Package com.google.apphosting.runtime
Class RuntimeLogSink
- java.lang.Object
-
- com.google.apphosting.runtime.RuntimeLogSink
-
public class RuntimeLogSink extends Object
RuntimeLogSinkattaches a rootHandlerthat records all log messagesLevel.INFOor higher as aRuntimePb.UPResponse.RuntimeLogLineattached to the currentRuntimePb.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 Summary
Constructors Constructor Description RuntimeLogSink(long maxSizeBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHandlerToRootLogger()voidflushLogs(MutableUpResponse response)
-
-
-
Method Detail
-
addHandlerToRootLogger
public void addHandlerToRootLogger()
-
flushLogs
public void flushLogs(MutableUpResponse response)
-
-