APIdia Launch Partner
Top Inners Fields Constructors Methods
jdk.jfr.internal.consumer

public final Class EventLog

extends Object
Class Inheritance
Imports
java.io.IOException, .PrintWriter, .Writer, java.util.HashSet, .Set, jdk.jfr.EventType, .FlightRecorder, jdk.jfr.consumer.EventStream, .RecordedEvent, jdk.jfr.internal.LogLevel, .LogTag, .Logger, .PlatformEventType, .PrivateAccess, jdk.jfr.internal.tool.PrettyWriter

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static EventStream
private static EventLog.LogWriter
private static PrettyWriter
private static Set<Long>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
private static boolean
private static boolean
private static void
private static void
log(RecordedEvent event, int stackDepth, LogLevel level, boolean system)

public static boolean
public static void
public static void
stop()

public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logStreamback to summary
private static EventStream logStream
logWriterback to summary
private static EventLog.LogWriter logWriter
prettyWriterback to summary
private static PrettyWriter prettyWriter
systemEventLookupback to summary
private static Set<Long> systemEventLookup

Constructor Detail

EventLogback to summary
public EventLog()

Method Detail

ensureSystemEventLookupback to summary
private static void ensureSystemEventLookup()
isLoggingback to summary
private static boolean isLogging()
isSystemEventback to summary
private static boolean isSystemEvent(RecordedEvent event)
logback to summary
private static void log(RecordedEvent event)
logback to summary
private static void log(RecordedEvent event, int stackDepth, LogLevel level, boolean system)
shouldLogback to summary
public static boolean shouldLog()
startback to summary
public static void start()
stopback to summary
public static void stop()
updateback to summary
public static void update()
jdk.jfr.internal.consumer back to summary

private final Class EventLog.LogWriter

extends Writer
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final StringBuilder
private LogLevel
private boolean
Inherited from java.io.Writer:
lock

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements abstract java.io.Writer.close.

Implements java.io.Closeable.close.

Closes the stream, flushing it first.

public void
flush()

Implements abstract java.io.Writer.flush.

Implements java.io.Flushable.flush.

Flushes the stream.

public void
public void
setSystem(boolean system)

public void
write(char[] buffer, int off, int len)

Implements abstract java.io.Writer.write.

Writes a portion of an array of characters.

Inherited from java.io.Writer:
appendappendappendnullWriterwritewritewritewrite

Field Detail

builderback to summary
private final StringBuilder builder
levelback to summary
private LogLevel level
systemback to summary
private boolean system

Constructor Detail

LogWriterback to summary
private LogWriter()

Method Detail

closeback to summary
public void close() throws IOException

Implements abstract java.io.Writer.close.

Implements java.io.Closeable.close.

Doc from java.io.Writer.close.

Closes the stream, flushing it first. Once the stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously closed stream has no effect.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
flushback to summary
public void flush() throws IOException

Implements abstract java.io.Writer.flush.

Implements java.io.Flushable.flush.

Doc from java.io.Writer.flush.

Flushes the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.

If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
setLevelback to summary
public void setLevel(LogLevel level)
setSystemback to summary
public void setSystem(boolean system)
writeback to summary
public void write(char[] buffer, int off, int len) throws IOException

Implements abstract java.io.Writer.write.

Doc from java.io.Writer.write.

Writes a portion of an array of characters.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs