Package com.google.apphosting.runtime
Class JsonLogHandler
- java.lang.Object
-
- java.util.logging.Handler
-
- com.google.apphosting.runtime.LogHandler
-
- com.google.apphosting.runtime.JsonLogHandler
-
public final class JsonLogHandler extends LogHandler
A log handler that publishes log messages in a json format.
-
-
Constructor Summary
Constructors Constructor Description JsonLogHandler(PrintStream out, boolean closePrintStreamOnClose, String projectId, Formatter formatter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidpublish(LogRecord record)-
Methods inherited from class com.google.apphosting.runtime.LogHandler
init
-
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
-
-
-
-
Constructor Detail
-
JsonLogHandler
public JsonLogHandler(PrintStream out, boolean closePrintStreamOnClose, @Nullable String projectId, Formatter formatter)
-
-
Method Detail
-
publish
public void publish(LogRecord record)
- Specified by:
publishin classLogHandler
-
flush
public void flush()
- Specified by:
flushin classLogHandler
-
close
public void close() throws SecurityException- Specified by:
closein classLogHandler- Throws:
SecurityException
-
-