| Line 4... |
Line 4... |
| 4 |
import in.shop2020.datalogger.SocialEventType;
|
4 |
import in.shop2020.datalogger.SocialEventType;
|
| 5 |
import in.shop2020.datalogger.event.Event;
|
5 |
import in.shop2020.datalogger.event.Event;
|
| 6 |
import in.shop2020.datalogger.socialevent.SocialEvent;
|
6 |
import in.shop2020.datalogger.socialevent.SocialEvent;
|
| 7 |
|
7 |
|
| 8 |
import java.io.BufferedReader;
|
8 |
import java.io.BufferedReader;
|
| - |
|
9 |
import java.io.IOException;
|
| 9 |
import java.io.InputStreamReader;
|
10 |
import java.io.InputStreamReader;
|
| 10 |
import java.io.OutputStreamWriter;
|
11 |
import java.io.OutputStreamWriter;
|
| - |
|
12 |
import java.io.UnsupportedEncodingException;
|
| - |
|
13 |
import java.net.MalformedURLException;
|
| 11 |
import java.net.URL;
|
14 |
import java.net.URL;
|
| 12 |
import java.net.URLConnection;
|
15 |
import java.net.URLConnection;
|
| 13 |
import java.net.URLEncoder;
|
16 |
import java.net.URLEncoder;
|
| 14 |
import java.util.Date;
|
17 |
import java.util.Date;
|
| 15 |
import java.util.ResourceBundle;
|
18 |
import java.util.ResourceBundle;
|
| Line 66... |
Line 69... |
| 66 |
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
|
69 |
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
|
| 67 |
wr.write(data);
|
70 |
wr.write(data);
|
| 68 |
wr.close();
|
71 |
wr.close();
|
| 69 |
|
72 |
|
| 70 |
conn.getInputStream().close();
|
73 |
conn.getInputStream().close();
|
| - |
|
74 |
|
| 71 |
} catch (Exception e) {
|
75 |
} catch (UnsupportedEncodingException e) {
|
| 72 |
rootLogger.error("Unable to post data to web data log");
|
76 |
rootLogger.error("Unsupported Encoding Exception: " + eType.name() + " " + sessionId + " " + userId + " " + email);
|
| - |
|
77 |
log.error(eType.name() + ", " + sessionId + ", " + Long.toString(userId) + ", " + email + ", " + strToWrite);
|
| - |
|
78 |
|
| - |
|
79 |
} catch (MalformedURLException e) {
|
| - |
|
80 |
rootLogger.error("Malformed URL Exception: " + eType.name() + " " + sessionId + " " + userId + " " + email);
|
| 73 |
log.info(eType.name() + ", " + sessionId + ", " + Long.toString(userId) + ", " + email + ", " + strToWrite);
|
81 |
log.error(eType.name() + ", " + sessionId + ", " + Long.toString(userId) + ", " + email + ", " + strToWrite);
|
| 74 |
}
|
82 |
|
| - |
|
83 |
} catch (IOException e) {
|
| - |
|
84 |
rootLogger.error("IO Exception: " + eType.name() + " " + sessionId + " " + userId + " " + email);
|
| - |
|
85 |
log.error(eType.name() + ", " + sessionId + ", " + Long.toString(userId) + ", " + email + ", " + strToWrite);
|
| - |
|
86 |
}
|
| 75 |
}
|
87 |
}
|
| 76 |
});
|
88 |
});
|
| 77 |
}
|
89 |
}
|
| 78 |
|
90 |
|
| 79 |
public static void logSocialData(final SocialEventType eType, final String userId, final String... logData) {
|
91 |
public static void logSocialData(final SocialEventType eType, final String userId, final String... logData) {
|