@@ -65,8 +65,6 @@ public int send(final LogMsgGroup group) throws IOException {
6565
6666 // convert to json bytes
6767
68- String jsonString = objectMapper .writer ().writeValueAsString (group );
69-
7068 byte [] jsonBytes = objectMapper .writer ().writeValueAsBytes (group );
7169
7270 // post to stackify
@@ -83,43 +81,5 @@ public int send(final LogMsgGroup group) throws IOException {
8381 }
8482
8583 return statusCode ;
86-
87- /*
88- HttpURLConnection connection = null;
89-
90- try {
91- URL url = new URL(apiConfig.getApiUrl() + "/Log/Save");
92-
93- connection = (HttpURLConnection) url.openConnection();
94- connection.setDoInput(true);
95- connection.setDoOutput(true);
96- connection.setRequestProperty("Content-Type", "application/json");
97- connection.setRequestProperty("Content-Encoding", "gzip");
98- connection.setRequestProperty("X-Stackify-Key", apiConfig.getApiKey());
99- connection.setRequestProperty("X-Stackify-PV", "V1");
100- connection.setRequestMethod("POST");
101- connection.setConnectTimeout(5000);
102- connection.setReadTimeout(5000);
103-
104- OutputStream stream = new BufferedOutputStream(new GZIPOutputStream(connection.getOutputStream()));
105-
106- try {
107- objectMapper.writer().writeValue(stream, group);
108- } catch (JsonGenerationException e) {
109- throw new RuntimeException(e);
110- } catch (JsonMappingException e) {
111- throw new RuntimeException(e);
112- } catch (IOException e) {
113- throw new RuntimeException(e);
114- }
115-
116- stream.flush();
117- stream.close();
118-
119- return connection.getResponseCode();
120- } finally {
121- HttpUrlConnections.readAndCloseInputStreams(connection);
122- }
123- */
12484 }
12585}
0 commit comments