in invoker/core/src/main/java/com/google/cloud/functions/invoker/gcf/JsonLogHandler.java [45:57]
public void publish(LogRecord record) {
// We avoid String.format and String.join even though they would simplify the code.
// Logging code often shows up in profiling so we want to make this fast and StringBuilder is
// more performant.
StringBuilder json = new StringBuilder("{");
appendSeverity(json, record);
appendSourceLocation(json, record);
appendExecutionId(json, record);
appendMessage(json, record); // must be last, see appendMessage
json.append("}");
// We must output the log all at once (should only call println once per call to publish)
out.println(json);
}