/** * This method handles the wrapping of the incoming object and passes them to the context toJson builder implementation. * * @param instancesToLog an array of objects to wrap * @return the contextual toJson information as a String */ String propagateToContextLogBuilder(Object[] instancesToLog) { Object[] propagateArray = null; if (instancesToLog != null) { propagateArray = new Object[instancesToLog.length]; for (int i = 0; i < instancesToLog.length; i++) { propagateArray[i] = wrapInstance(instancesToLog[i]); } } return traceeGsonContextLogBuilder.logPassedContext(new PassedDataContextProvider(propagateArray)); }