logstash/src/main/java/com/tersesystems/echopraxia/logstash/LogstashLoggingContext.java
/**
   * Joins the two contexts together, concatenating the lists in a supplier function.
   *
   * @param context the context to join
   * @return the new context containing fields and markers from both.
   */
Joins the two contexts together, concatenating the lists in a supplier function.
@param context the context to join
@return the new context containing fields and markers from both.
Joins the two contexts together concatenating the lists in a supplier function . @param context the context to join @return the new context containing fields and markers from both .
public LogstashLoggingContext and(LogstashLoggingContext context) {
    if (context == null) {
      return this;
    }
    Supplier<List<Field>> joinedFields =
        joinFields(LogstashLoggingContext.this::getFields, context::getFields);
    Supplier<List<Marker>> joinedMarkers =
        joinMarkers(context::getMarkers, LogstashLoggingContext.this::getMarkers);
    return new LogstashLoggingContext(joinedFields, joinedMarkers);
  }
public LogstashLoggingContext and ( LogstashLoggingContext context ) { if ( context == null ) { return this ; } Supplier < List < Field > > joinedFields = joinFields ( LogstashLoggingContext . this :: getFields , context :: getFields ) ; Supplier < List < Marker > > joinedMarkers = joinMarkers ( context :: getMarkers , LogstashLoggingContext . this :: getMarkers ) ; return new LogstashLoggingContext ( joinedFields , joinedMarkers ) ; }
Joins the two contexts together, concatenating the lists in a supplier function.
Joins the two contexts together concatenating the lists in a supplier function .
// This MUST be lazy, we can't get the fields until statement evaluation