diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-15 11:51:29 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-15 11:51:29 +1200 |
commit | fa26dd5f14a991f327c26517a645c6b4f77c4a73 (patch) | |
tree | 26477b69c3aeca4cba7b6947cf6973d762841cda /src/org | |
parent | 2fb444df86d56246a8b5cee515eb91490c8dee05 (diff) | |
download | traccar-server-fa26dd5f14a991f327c26517a645c6b4f77c4a73.tar.gz traccar-server-fa26dd5f14a991f327c26517a645c6b4f77c4a73.tar.bz2 traccar-server-fa26dd5f14a991f327c26517a645c6b4f77c4a73.zip |
Provide error messages
Diffstat (limited to 'src/org')
34 files changed, 56 insertions, 56 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java index 4cf5d7a98..b4027fa38 100644 --- a/src/org/traccar/BasePipelineFactory.java +++ b/src/org/traccar/BasePipelineFactory.java @@ -355,7 +355,7 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> { try { pipeline.addLast("extraHandler." + i, (ChannelHandler) Class.forName(handlers[i]).newInstance()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException error) { - LOGGER.warn(null, error); + LOGGER.warn("Dynamic handler error", error); } } } diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java index e940d96c4..1f43d6a1e 100644 --- a/src/org/traccar/BaseProtocolDecoder.java +++ b/src/org/traccar/BaseProtocolDecoder.java @@ -61,7 +61,7 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder { return device.getId(); } catch (SQLException e) { - LOGGER.warn(null, e); + LOGGER.warn("Automatic device registration error", e); return 0; } } @@ -134,7 +134,7 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder { } } } catch (Exception e) { - LOGGER.warn(null, e); + LOGGER.warn("Find device error", e); } if (deviceId == 0 && Context.getConfig().getBoolean("database.registerUnknown")) { return addUnknownDevice(uniqueIds[0]); diff --git a/src/org/traccar/DefaultDataHandler.java b/src/org/traccar/DefaultDataHandler.java index f62dca681..876ecd90e 100644 --- a/src/org/traccar/DefaultDataHandler.java +++ b/src/org/traccar/DefaultDataHandler.java @@ -29,7 +29,7 @@ public class DefaultDataHandler extends BaseDataHandler { try { Context.getDataManager().addObject(position); } catch (Exception error) { - LOGGER.warn(null, error); + LOGGER.warn("Failed to store position", error); } return position; diff --git a/src/org/traccar/GeolocationHandler.java b/src/org/traccar/GeolocationHandler.java index 27043e94e..97b5fda6a 100644 --- a/src/org/traccar/GeolocationHandler.java +++ b/src/org/traccar/GeolocationHandler.java @@ -63,7 +63,7 @@ public class GeolocationHandler extends ChannelInboundHandlerAdapter { @Override public void onFailure(Throwable e) { - LOGGER.warn(null, e); + LOGGER.warn("Geolocation network error", e); ctx.fireChannelRead(position); } }); diff --git a/src/org/traccar/Main.java b/src/org/traccar/Main.java index 992bfd8de..73b18c139 100644 --- a/src/org/traccar/Main.java +++ b/src/org/traccar/Main.java @@ -115,7 +115,7 @@ public final class Main { try { Context.getDataManager().clearHistory(); } catch (SQLException error) { - LOGGER.warn(null, error); + LOGGER.warn("Clear history error", error); } } }, 0, CLEAN_PERIOD); @@ -132,7 +132,7 @@ public final class Main { } }); } catch (Exception e) { - LOGGER.error(null, e); + LOGGER.error("Main method error", e); throw new RuntimeException(e); } } diff --git a/src/org/traccar/MainEventHandler.java b/src/org/traccar/MainEventHandler.java index b24edf28e..2ba7e2af2 100644 --- a/src/org/traccar/MainEventHandler.java +++ b/src/org/traccar/MainEventHandler.java @@ -51,7 +51,7 @@ public class MainEventHandler extends ChannelInboundHandlerAdapter { try { Context.getDeviceManager().updateLatestPosition(position); } catch (SQLException error) { - LOGGER.warn(null, error); + LOGGER.warn("Failed to update device", error); } String uniqueId = Context.getIdentityManager().getById(position.getDeviceId()).getUniqueId(); diff --git a/src/org/traccar/WebDataHandler.java b/src/org/traccar/WebDataHandler.java index a8b4ab94a..f15821a11 100644 --- a/src/org/traccar/WebDataHandler.java +++ b/src/org/traccar/WebDataHandler.java @@ -130,7 +130,7 @@ public class WebDataHandler extends BaseDataHandler { try { Context.getClient().target(formatRequest(position)).request().async().get(); } catch (UnsupportedEncodingException | JsonProcessingException e) { - LOGGER.warn(null, e); + LOGGER.warn("Forwarding formatting error", e); } } return position; diff --git a/src/org/traccar/api/AsyncSocket.java b/src/org/traccar/api/AsyncSocket.java index 783aeb740..906d16b5b 100644 --- a/src/org/traccar/api/AsyncSocket.java +++ b/src/org/traccar/api/AsyncSocket.java @@ -89,7 +89,7 @@ public class AsyncSocket extends WebSocketAdapter implements ConnectionManager.U try { getRemote().sendString(Context.getObjectMapper().writeValueAsString(data), null); } catch (JsonProcessingException e) { - LOGGER.warn(null, e); + LOGGER.warn("Socket JSON formatting error", e); } } } diff --git a/src/org/traccar/api/SecurityRequestFilter.java b/src/org/traccar/api/SecurityRequestFilter.java index a76b34ad1..195c1f72f 100644 --- a/src/org/traccar/api/SecurityRequestFilter.java +++ b/src/org/traccar/api/SecurityRequestFilter.java @@ -96,7 +96,7 @@ public class SecurityRequestFilter implements ContainerRequestFilter { } } catch (SecurityException e) { - LOGGER.warn(null, e); + LOGGER.warn("Authentication error", e); } if (securityContext != null) { diff --git a/src/org/traccar/database/BaseObjectManager.java b/src/org/traccar/database/BaseObjectManager.java index 7a17f8934..8bf9ef860 100644 --- a/src/org/traccar/database/BaseObjectManager.java +++ b/src/org/traccar/database/BaseObjectManager.java @@ -77,7 +77,7 @@ public class BaseObjectManager<T extends BaseModel> { } } } catch (SQLException error) { - LOGGER.warn(null, error); + LOGGER.warn("Error refreshing items", error); } } } diff --git a/src/org/traccar/database/CommandsManager.java b/src/org/traccar/database/CommandsManager.java index daf154dc4..d6fdd66ca 100644 --- a/src/org/traccar/database/CommandsManager.java +++ b/src/org/traccar/database/CommandsManager.java @@ -129,7 +129,7 @@ public class CommandsManager extends ExtendedObjectManager<Command> { try { result.add(new Typed(field.get(null).toString())); } catch (IllegalArgumentException | IllegalAccessException error) { - LOGGER.warn(null, error); + LOGGER.warn("Get command types error", error); } } } diff --git a/src/org/traccar/database/ConnectionManager.java b/src/org/traccar/database/ConnectionManager.java index 3918bcc5f..3d37af710 100644 --- a/src/org/traccar/database/ConnectionManager.java +++ b/src/org/traccar/database/ConnectionManager.java @@ -133,7 +133,7 @@ public class ConnectionManager { try { Context.getDeviceManager().updateDeviceStatus(device); } catch (SQLException error) { - LOGGER.warn(null, error); + LOGGER.warn("Update device status error", error); } updateDevice(device); diff --git a/src/org/traccar/database/DeviceManager.java b/src/org/traccar/database/DeviceManager.java index be413a108..34b02c0e2 100644 --- a/src/org/traccar/database/DeviceManager.java +++ b/src/org/traccar/database/DeviceManager.java @@ -96,7 +96,7 @@ public class DeviceManager extends BaseObjectManager<Device> implements Identity try { updateDeviceCache(true); } catch (SQLException e) { - LOGGER.warn(null, e); + LOGGER.warn("Update device cache error", e); } result = super.getAllItems(); } @@ -231,7 +231,7 @@ public class DeviceManager extends BaseObjectManager<Device> implements Identity positions.put(position.getDeviceId(), position); } } catch (SQLException error) { - LOGGER.warn(null, error); + LOGGER.warn("Load latest positions error", error); } } } diff --git a/src/org/traccar/database/ExtendedObjectManager.java b/src/org/traccar/database/ExtendedObjectManager.java index e48a3e802..ceb85b537 100644 --- a/src/org/traccar/database/ExtendedObjectManager.java +++ b/src/org/traccar/database/ExtendedObjectManager.java @@ -108,7 +108,7 @@ public abstract class ExtendedObjectManager<T extends BaseModel> extends SimpleO } } catch (SQLException | ClassNotFoundException error) { - LOGGER.warn(null, error); + LOGGER.warn("Refresh permissions error", error); } } } diff --git a/src/org/traccar/database/GroupsManager.java b/src/org/traccar/database/GroupsManager.java index eca39f972..d8404c614 100644 --- a/src/org/traccar/database/GroupsManager.java +++ b/src/org/traccar/database/GroupsManager.java @@ -65,7 +65,7 @@ public class GroupsManager extends BaseObjectManager<Group> implements Managable try { updateGroupCache(true); } catch (SQLException e) { - LOGGER.warn(null, e); + LOGGER.warn("Update group cache error", e); } result = super.getAllItems(); } diff --git a/src/org/traccar/database/LdapProvider.java b/src/org/traccar/database/LdapProvider.java index 612abe055..b30ab45ed 100644 --- a/src/org/traccar/database/LdapProvider.java +++ b/src/org/traccar/database/LdapProvider.java @@ -158,7 +158,7 @@ public class LdapProvider { user.setLogin(accountName); user.setName(accountName); user.setEmail(accountName); - LOGGER.warn(null, e); + LOGGER.warn("User lookup error", e); } return user; } diff --git a/src/org/traccar/database/MediaManager.java b/src/org/traccar/database/MediaManager.java index 62459cb5e..edade5766 100644 --- a/src/org/traccar/database/MediaManager.java +++ b/src/org/traccar/database/MediaManager.java @@ -63,7 +63,7 @@ public class MediaManager { fileChannel.force(false); return name; } catch (IOException e) { - LOGGER.warn(null, e); + LOGGER.warn("Save media file error", e); } } return null; diff --git a/src/org/traccar/database/NotificationManager.java b/src/org/traccar/database/NotificationManager.java index 71a0a82e4..60f7f4e4f 100644 --- a/src/org/traccar/database/NotificationManager.java +++ b/src/org/traccar/database/NotificationManager.java @@ -64,7 +64,7 @@ public class NotificationManager extends ExtendedObjectManager<Notification> { try { getDataManager().addObject(event); } catch (SQLException error) { - LOGGER.warn(null, error); + LOGGER.warn("Event save error", error); } if (position != null && geocodeOnRequest && Context.getGeocoder() != null && position.getAddress() == null) { @@ -117,7 +117,7 @@ public class NotificationManager extends ExtendedObjectManager<Notification> { try { types.add(new Typed(field.get(null).toString())); } catch (IllegalArgumentException | IllegalAccessException error) { - LOGGER.warn(null, error); + LOGGER.warn("Get event types error", error); } } } diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java index c9d548fd1..d9ab93557 100644 --- a/src/org/traccar/database/PermissionsManager.java +++ b/src/org/traccar/database/PermissionsManager.java @@ -111,7 +111,7 @@ public class PermissionsManager { try { server = dataManager.getServer(); } catch (SQLException error) { - LOGGER.warn(null, error); + LOGGER.warn("Refresh server config error", error); } } @@ -146,7 +146,7 @@ public class PermissionsManager { } } catch (SQLException | ClassNotFoundException error) { - LOGGER.warn(null, error); + LOGGER.warn("Refresh device permissions error", error); } deviceUsers.clear(); diff --git a/src/org/traccar/database/QueryBuilder.java b/src/org/traccar/database/QueryBuilder.java index 8075223f2..5528b2320 100644 --- a/src/org/traccar/database/QueryBuilder.java +++ b/src/org/traccar/database/QueryBuilder.java @@ -292,7 +292,7 @@ public final class QueryBuilder { } } } catch (IllegalAccessException | InvocationTargetException | JsonProcessingException error) { - LOGGER.warn(null, error); + LOGGER.warn("Get property error", error); } } } @@ -324,7 +324,7 @@ public final class QueryBuilder { try { method.invoke(object, resultSet.getBoolean(name)); } catch (IllegalAccessException | InvocationTargetException error) { - LOGGER.warn(null, error); + LOGGER.warn("Set property error", error); } } }); @@ -335,7 +335,7 @@ public final class QueryBuilder { try { method.invoke(object, resultSet.getInt(name)); } catch (IllegalAccessException | InvocationTargetException error) { - LOGGER.warn(null, error); + LOGGER.warn("Set property error", error); } } }); @@ -346,7 +346,7 @@ public final class QueryBuilder { try { method.invoke(object, resultSet.getLong(name)); } catch (IllegalAccessException | InvocationTargetException error) { - LOGGER.warn(null, error); + LOGGER.warn("Set property error", error); } } }); @@ -357,7 +357,7 @@ public final class QueryBuilder { try { method.invoke(object, resultSet.getDouble(name)); } catch (IllegalAccessException | InvocationTargetException error) { - LOGGER.warn(null, error); + LOGGER.warn("Set property error", error); } } }); @@ -368,7 +368,7 @@ public final class QueryBuilder { try { method.invoke(object, resultSet.getString(name)); } catch (IllegalAccessException | InvocationTargetException error) { - LOGGER.warn(null, error); + LOGGER.warn("Set property error", error); } } }); @@ -382,7 +382,7 @@ public final class QueryBuilder { method.invoke(object, new Date(timestamp.getTime())); } } catch (IllegalAccessException | InvocationTargetException error) { - LOGGER.warn(null, error); + LOGGER.warn("Set property error", error); } } }); @@ -393,7 +393,7 @@ public final class QueryBuilder { try { method.invoke(object, resultSet.getBytes(name)); } catch (IllegalAccessException | InvocationTargetException error) { - LOGGER.warn(null, error); + LOGGER.warn("Set property error", error); } } }); @@ -406,7 +406,7 @@ public final class QueryBuilder { try { method.invoke(object, Context.getObjectMapper().readValue(value, parameterType)); } catch (InvocationTargetException | IllegalAccessException | IOException error) { - LOGGER.warn(null, error); + LOGGER.warn("Set property error", error); } } } diff --git a/src/org/traccar/database/SimpleObjectManager.java b/src/org/traccar/database/SimpleObjectManager.java index bf790da29..15dda4520 100644 --- a/src/org/traccar/database/SimpleObjectManager.java +++ b/src/org/traccar/database/SimpleObjectManager.java @@ -80,7 +80,7 @@ public abstract class SimpleObjectManager<T extends BaseModel> extends BaseObjec getUserItems(permission.getOwnerId()).add(permission.getPropertyId()); } } catch (SQLException | ClassNotFoundException error) { - LOGGER.warn(null, error); + LOGGER.warn("Error getting permissions", error); } } } diff --git a/src/org/traccar/database/StatisticsManager.java b/src/org/traccar/database/StatisticsManager.java index f6ede0a12..dcf15bb04 100644 --- a/src/org/traccar/database/StatisticsManager.java +++ b/src/org/traccar/database/StatisticsManager.java @@ -67,7 +67,7 @@ public class StatisticsManager { try { Context.getDataManager().addObject(statistics); } catch (SQLException e) { - LOGGER.warn(null, e); + LOGGER.warn("Error saving statistics", e); } String url = Context.getConfig().getString("server.statistics"); diff --git a/src/org/traccar/geocoder/JsonGeocoder.java b/src/org/traccar/geocoder/JsonGeocoder.java index c0c789a51..80123e01e 100644 --- a/src/org/traccar/geocoder/JsonGeocoder.java +++ b/src/org/traccar/geocoder/JsonGeocoder.java @@ -105,7 +105,7 @@ public abstract class JsonGeocoder implements Geocoder { try { return handleResponse(latitude, longitude, request.get(JsonObject.class), null); } catch (ClientErrorException e) { - LOGGER.warn(null, e); + LOGGER.warn("Geocoder network error", e); } } return null; diff --git a/src/org/traccar/helper/PatternUtil.java b/src/org/traccar/helper/PatternUtil.java index 53eeb0b24..74813e1d9 100644 --- a/src/org/traccar/helper/PatternUtil.java +++ b/src/org/traccar/helper/PatternUtil.java @@ -71,7 +71,7 @@ public final class PatternUtil { result.stringTail = input.substring(matcher.group(1).length()); } } catch (PatternSyntaxException error) { - LOGGER.warn(null, error); + LOGGER.warn("Pattern matching error", error); } } diff --git a/src/org/traccar/notification/NotificationFormatter.java b/src/org/traccar/notification/NotificationFormatter.java index 57be29b31..2f8100226 100644 --- a/src/org/traccar/notification/NotificationFormatter.java +++ b/src/org/traccar/notification/NotificationFormatter.java @@ -84,7 +84,7 @@ public final class NotificationFormatter { templateFilePath = Paths.get(path, event.getType() + ".vm").toString(); template = Context.getVelocityEngine().getTemplate(templateFilePath, StandardCharsets.UTF_8.name()); } catch (ResourceNotFoundException error) { - LOGGER.warn(null, error); + LOGGER.warn("Notification template error", error); templateFilePath = Paths.get(path, "unknown.vm").toString(); template = Context.getVelocityEngine().getTemplate(templateFilePath, StandardCharsets.UTF_8.name()); } diff --git a/src/org/traccar/notificators/Notificator.java b/src/org/traccar/notificators/Notificator.java index c3fad1607..5e40971c6 100644 --- a/src/org/traccar/notificators/Notificator.java +++ b/src/org/traccar/notificators/Notificator.java @@ -32,7 +32,7 @@ public abstract class Notificator { try { sendSync(userId, event, position); } catch (MessageException | InterruptedException error) { - LOGGER.warn(null, error); + LOGGER.warn("Event send error", error); } } }).start(); diff --git a/src/org/traccar/processing/ComputedAttributesHandler.java b/src/org/traccar/processing/ComputedAttributesHandler.java index d4090e709..c346661d3 100644 --- a/src/org/traccar/processing/ComputedAttributesHandler.java +++ b/src/org/traccar/processing/ComputedAttributesHandler.java @@ -80,7 +80,7 @@ public class ComputedAttributesHandler extends BaseDataHandler { } } } catch (IllegalAccessException | InvocationTargetException error) { - LOGGER.warn(null, error); + LOGGER.warn("Attribute reflection error", error); } } } @@ -101,7 +101,7 @@ public class ComputedAttributesHandler extends BaseDataHandler { try { result = computeAttribute(attribute, position); } catch (JexlException error) { - LOGGER.warn(null, error); + LOGGER.warn("Attribute computation error", error); } if (result != null) { try { @@ -118,7 +118,7 @@ public class ComputedAttributesHandler extends BaseDataHandler { position.getAttributes().put(attribute.getAttribute(), result.toString()); } } catch (ClassCastException error) { - LOGGER.warn(null, error); + LOGGER.warn("Attribute cast error", error); } } } diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java index bb821893a..e2ac3c736 100644 --- a/src/org/traccar/protocol/AplicomProtocolDecoder.java +++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java @@ -198,7 +198,7 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder { } break; default: - LOGGER.warn(null, new UnsupportedOperationException()); + LOGGER.warn("Aplicom CAN decoding error", new UnsupportedOperationException()); break; } } diff --git a/src/org/traccar/protocol/Mta6ProtocolDecoder.java b/src/org/traccar/protocol/Mta6ProtocolDecoder.java index ec20658c7..88419b871 100644 --- a/src/org/traccar/protocol/Mta6ProtocolDecoder.java +++ b/src/org/traccar/protocol/Mta6ProtocolDecoder.java @@ -88,7 +88,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder { previousFloat = (previousFloat & 0xff000000) + ((buf.readUnsignedMedium() & 0x3fffff) << 2); break; default: - LOGGER.warn(null, new IllegalArgumentException()); + LOGGER.warn("MTA6 float decoding error", new IllegalArgumentException()); break; } return Float.intBitsToFloat(previousFloat); @@ -195,7 +195,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder { positions.add(position); } } catch (IndexOutOfBoundsException error) { - LOGGER.warn(null, error); + LOGGER.warn("MTA6 parsing error", error); } return positions; diff --git a/src/org/traccar/smpp/ClientSmppSessionHandler.java b/src/org/traccar/smpp/ClientSmppSessionHandler.java index 37882c76a..55c6cccc3 100644 --- a/src/org/traccar/smpp/ClientSmppSessionHandler.java +++ b/src/org/traccar/smpp/ClientSmppSessionHandler.java @@ -45,7 +45,7 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler { @Override public PduResponse firePduRequestReceived(PduRequest request) { - PduResponse response = null; + PduResponse response; try { if (request instanceof DeliverSm) { String sourceAddress = ((DeliverSm) request).getSourceAddress().getAddress(); @@ -53,7 +53,7 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler { smppClient.mapDataCodingToCharset(((DeliverSm) request).getDataCoding())); LOGGER.debug("SMS Message Received: " + message.trim() + ", Source Address: " + sourceAddress); - boolean isDeliveryReceipt = false; + boolean isDeliveryReceipt; if (smppClient.getDetectDlrByOpts()) { isDeliveryReceipt = request.getOptionalParameters() != null; } else { @@ -65,8 +65,8 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler { } } response = request.createResponse(); - } catch (Throwable error) { - LOGGER.warn(null, error); + } catch (Exception error) { + LOGGER.warn("SMS receiving error", error); response = request.createResponse(); response.setResultMessage(error.getMessage()); response.setCommandStatus(SmppConstants.STATUS_UNKNOWNERR); diff --git a/src/org/traccar/smpp/SmppClient.java b/src/org/traccar/smpp/SmppClient.java index d7e262c87..c9869cb9c 100644 --- a/src/org/traccar/smpp/SmppClient.java +++ b/src/org/traccar/smpp/SmppClient.java @@ -263,7 +263,7 @@ public class SmppClient implements SmsManager { try { sendMessageSync(destAddress, message, command); } catch (MessageException | InterruptedException | IllegalStateException error) { - LOGGER.warn(null, error); + LOGGER.warn("SMS sending error", error); } } }); diff --git a/src/org/traccar/web/ConsoleServlet.java b/src/org/traccar/web/ConsoleServlet.java index dddd13b6d..2b38a935a 100644 --- a/src/org/traccar/web/ConsoleServlet.java +++ b/src/org/traccar/web/ConsoleServlet.java @@ -54,7 +54,7 @@ public class ConsoleServlet extends WebServlet { method.invoke(server, true); } catch (NoSuchFieldException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) { - LOGGER.warn(null, e); + LOGGER.warn("Console reflection error", e); } } diff --git a/src/org/traccar/web/CsvBuilder.java b/src/org/traccar/web/CsvBuilder.java index d5149b528..29e2ccfbc 100644 --- a/src/org/traccar/web/CsvBuilder.java +++ b/src/org/traccar/web/CsvBuilder.java @@ -106,12 +106,12 @@ public class CsvBuilder { builder.append(map); addSeparator(); } catch (JsonProcessingException e) { - LOGGER.warn(null, e); + LOGGER.warn("Map JSON formatting error", e); } } } } catch (IllegalAccessException | InvocationTargetException error) { - LOGGER.warn(null, error); + LOGGER.warn("Reflection invocation error", error); } } } diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java index 32c336164..8887b6af3 100644 --- a/src/org/traccar/web/WebServer.java +++ b/src/org/traccar/web/WebServer.java @@ -153,7 +153,7 @@ public class WebServer { javax.naming.Context context = new InitialContext(); context.bind("java:/DefaultDS", dataSource); } catch (Exception error) { - LOGGER.warn(null, error); + LOGGER.warn("JNDI context error", error); } WebAppContext app = new WebAppContext(); @@ -199,7 +199,7 @@ public class WebServer { try { server.start(); } catch (Exception error) { - LOGGER.warn(null, error); + LOGGER.warn("Web server start failed", error); } } @@ -207,7 +207,7 @@ public class WebServer { try { server.stop(); } catch (Exception error) { - LOGGER.warn(null, error); + LOGGER.warn("Web server stop failed", error); } } |