protected void collectSourceLocation(final LogEvent logEvent, final SortedArrayStringMap contextData) {
        val source = logEvent.getSource();
        if (source != null) {
            val sourceLocationMap = Map.of(
                "class", source.getClassName(),
                "function", source.getMethodName(),
                "file", StringUtils.defaultIfBlank(source.getFileName(), "N/A"),
                "line", source.getLineNumber());
            contextData.putValue("sourceLocation", sourceLocationMap);
            sourceLocationMap.forEach((key, value) -> contextData.putValue("sourceLocation-%s".formatted(key), value));
        }
    }
Build google cloud appender.

@param name           the name
@param projectId      the project id
@param flattenMessage the flatten message
@param appenderRef    the appender ref
@param filter         the filter
@param config         the config
@return the google cloud appender
support/cas-server-support-gcp-logging/src/main/java/org/apereo/cas/logging/GoogleCloudAppender.java