public class FunctionPointerLogHandler extends Object implements LogHandlerExtension
LogHandler that can use provided function pointers for each operation. If a function
pointer is missing, it forwards the operation to the delegate set in the constructor.| Constructor and Description |
|---|
FunctionPointerLogHandler(org.graalvm.nativeimage.LogHandler delegate) |
| Modifier and Type | Method and Description |
|---|---|
static void |
afterParsingVMOptions()
Notifies that
JNI_CreateJavaVM has finished parsing all JavaVMOptions. |
Log |
enterFatalContext(org.graalvm.nativeimage.c.function.CodePointer callerIP,
String msg,
Throwable ex)
This method gets called if the VM finds itself in a fatal, non-recoverable error situation.
|
void |
fatalError() |
void |
flush() |
org.graalvm.nativeimage.c.function.CFunctionPointer |
getFatalErrorFunctionPointer() |
void |
log(org.graalvm.nativeimage.c.type.CCharPointer bytes,
org.graalvm.word.UnsignedWord length) |
static boolean |
parseVMOption(String optionString,
org.graalvm.nativeimage.c.type.WordPointer extraInfo)
Parses a
JavaVMOption passed to JNI_CreateJavaVM. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfatalContextpublic FunctionPointerLogHandler(org.graalvm.nativeimage.LogHandler delegate)
public void log(org.graalvm.nativeimage.c.type.CCharPointer bytes,
org.graalvm.word.UnsignedWord length)
log in interface org.graalvm.nativeimage.LogHandlerpublic void flush()
flush in interface org.graalvm.nativeimage.LogHandlerpublic Log enterFatalContext(org.graalvm.nativeimage.c.function.CodePointer callerIP, String msg, Throwable ex)
LogHandlerExtensionLog object if fatal error information should be
sent to the log object. Returning null specifies that no further information is to be
logged and the VM must immediately call LogHandler.fatalError().enterFatalContext in interface LogHandlerExtensioncallerIP - the address of the call-site where the fatal error occurredmsg - provides optional text that was passed to the fatal error callex - provides optional exception object that was passed to the fatal error callLog object to which fatal logging is sent or null if the VM must
not do any further logging before calling LogHandler.fatalError()public void fatalError()
fatalError in interface org.graalvm.nativeimage.LogHandlerpublic org.graalvm.nativeimage.c.function.CFunctionPointer getFatalErrorFunctionPointer()
public static boolean parseVMOption(String optionString, org.graalvm.nativeimage.c.type.WordPointer extraInfo)
JavaVMOption passed to JNI_CreateJavaVM.optionString - value of the javaVMOption.optionString fieldextraInfo - value of the javaVMOption.extraInfo fieldtrue iff the option was consumed by this methodpublic static void afterParsingVMOptions()
JNI_CreateJavaVM has finished parsing all JavaVMOptions.