You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/08/01 14:16:42 UTC

[GitHub] andrewnet commented on issue #2548: The logs in activation is not complete

andrewnet commented on issue #2548: The logs in activation is not complete
URL: https://github.com/apache/incubator-openwhisk/issues/2548#issuecomment-319383159
 
 
   Just to avoid any doubt, we tried below too. We see the lines printed directly to System.out and System.err were missing too.
   
   ```
   	public static JsonObject main(JsonObject args) {
       	JsonObject resp = null;
       	try {
       		logger.info("Enter WhiskMain");
       		logger.info(getCallInfo());
       		
       		//temporary workaround to prevent JVM heap size is go beyond 
       		//the container limit of openwhisk. the issue can be tracked at
       		//https://github.com/apache/incubator-openwhisk/issues/2389
       		System.gc();
       		
       		resp = executeImpl(args);
       		return resp;
       	} catch (RuntimeException | Error e) {
       		logger.error("WhiskMain caught unchecked throwable", e);
       		throw e;
   	} finally {
   		System.out.println("Printed by System.out - before last log item");
   		System.err.println("Printed by System.err - before last log item");
       		logger.info("Exit WhiskMain, resp=" + resp);
   		System.out.println("Printed by System.out - after last log item");
   		System.err.println("Printed by System.err - after last log item");
   		System.out.flush();
   		System.err.flush();
   	}
       }
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services