Add some log messages for better debugging
This commit is contained in:
parent
2b0b33baea
commit
44738b51dd
@ -87,12 +87,10 @@ public class DMTPConnection implements Runnable {
|
|||||||
String subject = "";
|
String subject = "";
|
||||||
if (userInput.split("\\s+").length > 1)
|
if (userInput.split("\\s+").length > 1)
|
||||||
subject = userInput.split("\\s+", 2)[1];
|
subject = userInput.split("\\s+", 2)[1];
|
||||||
logger.info("Setting subject to: " + subject);
|
|
||||||
msg.setSubject(subject);
|
msg.setSubject(subject);
|
||||||
out.println("ok");
|
out.println("ok");
|
||||||
} else if ("data".equals(userInput.split("\\s+")[0])) {
|
} else if ("data".equals(userInput.split("\\s+")[0])) {
|
||||||
String data = userInput.split("\\s+", 2)[1];
|
String data = userInput.split("\\s+", 2)[1];
|
||||||
logger.info("Setting data to: " + data);
|
|
||||||
msg.setData(data);
|
msg.setData(data);
|
||||||
out.println("ok");
|
out.println("ok");
|
||||||
} else {
|
} else {
|
||||||
@ -111,6 +109,7 @@ public class DMTPConnection implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void storeMessage() throws UnknownRecipientException {
|
private synchronized void storeMessage() throws UnknownRecipientException {
|
||||||
|
logger.info("Storing message " + msg.toString());
|
||||||
String errorUnknownRecipient = "";
|
String errorUnknownRecipient = "";
|
||||||
for (Email recipient : this.msg.getTo()) {
|
for (Email recipient : this.msg.getTo()) {
|
||||||
if (this.messageStorage.containsKey(recipient)) {
|
if (this.messageStorage.containsKey(recipient)) {
|
||||||
|
|||||||
@ -50,7 +50,7 @@ public class DMTPListener extends Thread {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void shutdown() {
|
public void shutdown() {
|
||||||
logger.finer("Shutting down DMTPHandler " + this.toString());
|
logger.finer("Shutting down DMTPListener " + this.toString());
|
||||||
for (DMTPConnection client : clients) {
|
for (DMTPConnection client : clients) {
|
||||||
if (client != null)
|
if (client != null)
|
||||||
client.shutdown();
|
client.shutdown();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user