public int send(final LogMsgGroup group) throws IOException {
		Preconditions.checkNotNull(group);

		executeMask(group);
		executeSkipJsonTag(group);

		HttpClient httpClient = new HttpClient(apiConfig);

		// retransmit any logs on the resend queue

		resendQueue.drain(httpClient, LOG_SAVE_PATH, true);

		// convert to json bytes

		byte[] jsonBytes = objectMapper.writer().writeValueAsBytes(group);

		// post to stackify

		int statusCode = HttpURLConnection.HTTP_INTERNAL_ERROR;

		try {
			httpClient.post(LOG_SAVE_PATH, jsonBytes, true);
			statusCode = HttpURLConnection.HTTP_OK;
		} catch (IOException t) {
			LOGGER.info("Queueing logs for retransmission due to IOException");
			resendQueue.offer(jsonBytes, t);
			throw t;
		} catch (HttpException e) {
			statusCode = e.getStatusCode();
			LOGGER.info("Queueing logs for retransmission due to HttpException", e);
			resendQueue.offer(jsonBytes, e);
		}

		return statusCode;
	}
public int send ( final LogMsgGroup group ) throws IOException { Preconditions . checkNotNull ( group ) ; executeMask ( group ) ; executeSkipJsonTag ( group ) ; HttpClient httpClient = new HttpClient ( apiConfig ) ; resendQueue . drain ( httpClient , LOG_SAVE_PATH , true ) ; byte [ ] jsonBytes = objectMapper . writer ( ) . writeValueAsBytes ( group ) ; int statusCode = HttpURLConnection . HTTP_INTERNAL_ERROR ; try { httpClient . post ( LOG_SAVE_PATH , jsonBytes , true ) ; statusCode = HttpURLConnection . HTTP_OK ; } catch ( IOException t ) { LOGGER . info ( "Queueing logs for retransmission due to IOException" ) ; resendQueue . offer ( jsonBytes , t ) ; throw t ; } catch ( HttpException e ) { statusCode = e . getStatusCode ( ) ; LOGGER . info ( "Queueing logs for retransmission due to HttpException" , e ) ; resendQueue . offer ( jsonBytes , e ) ; } return statusCode ; }
Sends a group of log messages to Stackify
@param group The log message group
@return The HTTP status code returned from the HTTP POST
@throws IOException