public interface LogHandler
ImageSingletons
, using this interface as the key, at Feature.duringSetup()
time:
class LogHandlerFeature implements Feature { @Override public void duringSetup(DuringSetupAccess access) { ImageSingletons.add(LogHandler.class, new CustomLogHandler()); } }If no custom log handler is installed, a default is installed
Feature.beforeAnalysis() before the static analysis
. The default handler prints log
messages to the standard output. Installing a custom log handler at a later time, after the
default one has been installed, results in an error.
The methods defined in this interface are called from places where Java object allocation is not possible, e.g., during a garbage collection or before the heap is set up. If an implementation of the interface allocates a Java object or array, an error is reported during image generation.
Modifier and Type | Method and Description |
---|---|
void |
fatalError()
Exit the VM because a fatal, non-recoverable error situation has been detected.
|
void |
flush()
Flush the log to its destination.
|
void |
log(CCharPointer bytes,
UnsignedWord length)
Write raw bytes to the log.
|
void log(CCharPointer bytes, UnsignedWord length)
The methods defined in this interface are called from places where Java object allocation is not possible, e.g., during a garbage collection or before the heap is set up. If an implementation of the interface allocates a Java object or array, an error is reported during image generation.
void flush()
The methods defined in this interface are called from places where Java object allocation is not possible, e.g., during a garbage collection or before the heap is set up. If an implementation of the interface allocates a Java object or array, an error is reported during image generation.
void fatalError()
The methods defined in this interface are called from places where Java object allocation is not possible, e.g., during a garbage collection or before the heap is set up. If an implementation of the interface allocates a Java object or array, an error is reported during image generation.