Skip to content

Commit e298cb9

Browse files
committed
Move JavaSE classes to use the new logError Apis
1 parent 05d2627 commit e298cb9

9 files changed

Lines changed: 16 additions & 16 deletions

File tree

base/src/main/java/com/livio/BSON/BsonEncoder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static byte[] encodeToBytes(HashMap<String, Object> map) throws ClassCast
4747

4848
return encoder.encode(bson);
4949
}
50-
DebugTool.logError("Something went wrong encoding the map into BSON bytes");
50+
DebugTool.logError(null, "Something went wrong encoding the map into BSON bytes");
5151

5252
return null;
5353
}
@@ -63,7 +63,7 @@ public static HashMap<String, Object> decodeFromBytes(byte[] bytes) {
6363
}
6464
}
6565
}
66-
DebugTool.logError("Something went wrong decoding bytes into BSON");
66+
DebugTool.logError(null, "Something went wrong decoding bytes into BSON");
6767
return null;
6868
}
6969

base/src/main/java/com/smartdevicelink/SdlConnection/SdlSession.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public void onProtocolSessionEnded(SessionType sessionType, byte sessionID,
295295
@Override
296296
public void onProtocolError(String info, Exception e) {
297297
this.sessionListener.onProtocolError(info, e);
298-
DebugTool.logError("on protocol error", e);
298+
DebugTool.logError(TAG,"on protocol error", e);
299299
}
300300

301301

base/src/main/java/com/smartdevicelink/streaming/StreamPacketizer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public void run() {
118118
mPauseLock.wait();
119119
}
120120
catch (InterruptedException e) {
121-
DebugTool.logError("Streaming thread has been interrupted", e);
121+
DebugTool.logError(TAG, "Streaming thread has been interrupted", e);
122122
}
123123
}
124124
}

base/src/main/java/com/smartdevicelink/trace/SdlTrace.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ private static boolean writeXmlTraceMessage(String msg) {
419419
try {
420420
localTraceListener.logXmlMsg(msg, SDL_LIB_TRACE_KEY);
421421
} catch (Exception ex) {
422-
DebugTool.logError("Failure calling ISTListener: " + ex.toString(), ex);
422+
DebugTool.logError(null,"Failure calling ISTListener: " + ex.toString(), ex);
423423
return false;
424424
}
425425
}

base/src/main/java/com/smartdevicelink/transport/CustomTransport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public void write(SdlPacket packet) {
138138
try {
139139
onWrite(bytes, 0, bytes.length);
140140
} catch (Exception exc) {
141-
DebugTool.logError("Error attempting to write packet", exc);
141+
DebugTool.logError(TAG, "Error attempting to write packet", exc);
142142
}
143143
}
144144
}

base/src/main/java/com/smartdevicelink/transport/TransportManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public void onConnectionEstablished() {
180180

181181
@Override
182182
public void onError() {
183-
DebugTool.logError("Error in the transport manager from the web socket server");
183+
DebugTool.logError(TAG, "Error in the transport manager from the web socket server");
184184
if(transportListener != null){
185185
transportListener.onError("");
186186
}

base/src/main/java/com/smartdevicelink/transport/WebSocketServer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public WebSocketServer(WebSocketServerConfig config, TransportCallback callback)
6666
if(factory!=null){
6767
this.setWebSocketFactory(factory);
6868
}else{
69-
DebugTool.logError("WebSocketServer: Unable to generate SSL Web Socket Server Factory");
69+
DebugTool.logError(TAG, "WebSocketServer: Unable to generate SSL Web Socket Server Factory");
7070
}
7171
}
7272

@@ -138,7 +138,7 @@ public void onWebsocketCloseInitiated(WebSocket conn, int code, String reason) {
138138

139139
@Override
140140
public void onMessage(WebSocket webSocket, String s) {
141-
DebugTool.logError("Incorrect message type received, dropping. - String: " + s);
141+
DebugTool.logError(TAG, "Incorrect message type received, dropping. - String: " + s);
142142
}
143143

144144
@Override
@@ -182,7 +182,7 @@ public void onMessage(WebSocket conn, ByteBuffer message) {
182182

183183
@Override
184184
public void onError(WebSocket webSocket, Exception e) {
185-
DebugTool.logError("bad", e);
185+
DebugTool.logError(TAG, "bad", e);
186186
if(callback!=null) {
187187
callback.onError();
188188
}

base/src/main/java/com/smartdevicelink/transport/utl/SSLWebSocketFactoryGenerator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ public static WebSocketServerFactory generateWebSocketServer(SSLConfig config){
7070
context = getSSLContextFromPem(config);
7171
break;
7272
default:
73-
DebugTool.logError("Unable to generateWebSocketServer. Unsupported cert type.");
73+
DebugTool.logError(null, "Unable to generateWebSocketServer. Unsupported cert type.");
7474
return null;
7575
}
7676
if(context != null) {
7777
return new DefaultSSLWebSocketServerFactory(context);
7878
}else{
79-
DebugTool.logError("SSLWebSocketFactoryGenerator: Unable to create SSL Context");
79+
DebugTool.logError(null, "SSLWebSocketFactoryGenerator: Unable to create SSL Context");
8080
return null;
8181
}
8282
}
@@ -101,7 +101,7 @@ private static SSLContext getSSLContextFromJKS(SSLConfig config){
101101
return sslContext;
102102
}
103103
catch(Exception e){
104-
DebugTool.logError("Issue creating SSLContext with JKS : " , e);
104+
DebugTool.logError(null, "Issue creating SSLContext with JKS : " , e);
105105
}
106106
return null;
107107
}
@@ -133,7 +133,7 @@ private static SSLContext getSSLContextFromPem(SSLConfig config) {
133133
context.init( km, null, null );
134134
} catch ( Exception e ) {
135135
context = null;
136-
DebugTool.logError("Issue creating SSLContext with PEM Cert : " , e);
136+
DebugTool.logError(null, "Issue creating SSLContext with PEM Cert : " , e);
137137
}
138138
return context;
139139
}

javaSE/src/main/java/com/smartdevicelink/managers/SdlManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void checkState() {
103103
onReady();
104104
} else if (permissionManager.getState() == BaseSubManager.ERROR && fileManager.getState() == BaseSubManager.ERROR && screenManager.getState() == BaseSubManager.ERROR) {
105105
String info = "ERROR starting sdl manager, all sub managers are in error state";
106-
DebugTool.logError(info);
106+
DebugTool.logError(TAG, info);
107107
transitionToState(BaseSubManager.ERROR);
108108
notifyDevListener(info);
109109
} else if (permissionManager.getState() == BaseSubManager.SETTING_UP || fileManager.getState() == BaseSubManager.SETTING_UP || screenManager.getState() == BaseSubManager.SETTING_UP) {
@@ -120,7 +120,7 @@ void checkState() {
120120
} else {
121121
// We should never be here, but somehow one of the sub-sub managers is null
122122
String info = "ERROR one of the sdl sub managers is null";
123-
DebugTool.logError(info);
123+
DebugTool.logError(TAG, info);
124124
transitionToState(BaseSubManager.ERROR);
125125
notifyDevListener(info);
126126
}

0 commit comments

Comments
 (0)