Logs are sometimes not emitted for failures that occur within function initialization - this means that errors related to:
Function construction
Incorrect handler methods
Non-existant classes
Are not logged
It think this is caused by two things:
the log framing tag is not emitted until after the method has been initalized, after these errors may have occured.
The JVM is shut down before the logs are flushed to docker
This change defers initialization of the function Runtime context until the first event is received, ensuring that initialization errors are logged, and also moves log framing out of the method invoker and up to the function entrypoint.
This also keeps the JVM alive if there is an error in initalization.
Logs are sometimes not emitted for failures that occur within function initialization - this means that errors related to:
Are not logged
It think this is caused by two things:
This change defers initialization of the function Runtime context until the first event is received, ensuring that initialization errors are logged, and also moves log framing out of the method invoker and up to the function entrypoint.
This also keeps the JVM alive if there is an error in initalization.