|
From: <tre...@us...> - 2007-12-13 01:29:34
|
Revision: 629
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=629&view=rev
Author: trevorolio
Date: 2007-12-12 17:29:36 -0800 (Wed, 12 Dec 2007)
Log Message:
-----------
Removed old debug messages.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceDuplicator.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClient.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/Space.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/SenderQueue.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPChannel.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometClient.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometProto.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/Log.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceDuplicator.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceDuplicator.java 2007-12-13 01:29:24 UTC (rev 628)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceDuplicator.java 2007-12-13 01:29:36 UTC (rev 629)
@@ -36,14 +36,12 @@
throw new IllegalArgumentException("Cannot copy a space to itself: " + destinationSpaceID);
}
- Log.info("DUP:Creating new client:"+destinationSpaceID+","+emptyFirst+", from "+originSpaceID);
WebAPIClient client = new WebAPIClient(descriptor, auth, wire);
if (emptyFirst) {
emptySpace(destinationSpaceID, client);
}
- Log.info("DUP: Getting space document and setting simple properties");
SpaceDocument spaceDoc1 = client.getSpaceDocument(originSpaceID, false);
SpaceDocument spaceDoc2 = client.getSpaceDocument(destinationSpaceID, false);
@@ -54,9 +52,7 @@
client.setSpacePublished(destinationSpaceID, spaceDoc1.isPublished());
ThingDocument[] thingDocs = client.getThingDocuments(originSpaceID);
- Log.info("DUP: setting up possessions and things:"+thingDocs.length);
for (int i = 0; i < thingDocs.length; i++) {
- Log.info("DUP: Setting up thing "+i+":"+thingDocs[i].getDisplayName());
PossessionDocument[] possDocuments = client.getPossessionDocuments();
PossessionDocument possToUse = null;
for (int j = 0; j < possDocuments.length; j++) {
@@ -85,12 +81,10 @@
}
DoorDocument[] doorDocs = client.getDoorDocuments(spaceDoc1.getSpaceID());
- Log.info("DUP: Setting up doors:"+doorDocs.length);
for (int i = 0; i < doorDocs.length; i++) {
client.createDoor(spaceDoc2.getSpaceID(), doorDocs[i].getTemplateID(), doorDocs[i].getTemplateOwner(), doorDocs[i].getDisplayName(), doorDocs[i].getLink(), doorDocs[i].getTransform());
}
- Log.info("DUP: copying space settings ");
Map settings = client.getSpaceSettings(spaceDoc1.getSpaceID());
String[] keys = (String[]) settings.keySet().toArray(new String[0]);
for (int i = 0; i < keys.length; i++) {
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClient.java 2007-12-13 01:29:24 UTC (rev 628)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClient.java 2007-12-13 01:29:36 UTC (rev 629)
@@ -86,25 +86,16 @@
public AccountDocument updateAccount(AccountDocument accountDoc) throws IOException {
XMLElement result = wire.sendAuthenticatedXML(descriptor.getAccountURI(accountDoc.getUsername()), accountDoc.toElement().toString(), "POST", authenticator.getAuthCookie());
- if (result == null) {
- return null;
- }
return new AccountDocument(result);
}
public AccountDocument getAccountDocument(String username) throws IOException {
XMLElement response = wire.fetchAuthenticatedXML(descriptor.getAccountURI(username), authenticator.getAuthCookie());
- if (response == null) {
- return null;
- }
return new AccountDocument(response);
}
public AuthDocument getAuthDocumentByAuthCookie(String authCookie) throws IOException {
XMLElement response = wire.fetchAuthenticatedXML(descriptor.getMeAuthURI(), authCookie);
- if (response == null) {
- return null;
- }
return new AuthDocument(response);
}
@@ -389,7 +380,6 @@
XMLElement list = wire.fetchAuthenticatedXML(descriptor.getThingsURI(spaceID), authenticator.getAuthCookie());
XMLElement[] children = (XMLElement[]) list.getChildren().toArray(new XMLElement[0]);
- Log.info("CLIENT: Fetched thing document for space "+spaceID+" and found "+children.length+" children");
for (int i = 0; i < children.length; i++) {
results.add(new ThingDocument(children[i]));
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/Space.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/Space.java 2007-12-13 01:29:24 UTC (rev 628)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/Space.java 2007-12-13 01:29:36 UTC (rev 629)
@@ -383,7 +383,6 @@
}
public synchronized Thing[] getThings() {
- Log.info("SPACE: query of things content:"+ things.values().size()+" of space "+spaceID);
return (Thing[]) things.values().toArray(new Thing[0]);
}
@@ -428,7 +427,6 @@
}
public void addThing(Thing thing) {
- Log.info("Space: adding thing:"+thing.getName()+" to space "+spaceID);
synchronized (this) {
if (thing.getThingID() == -1) {
thing.setThingID(getNewThingID());
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/SenderQueue.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/SenderQueue.java 2007-12-13 01:29:24 UTC (rev 628)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/SenderQueue.java 2007-12-13 01:29:36 UTC (rev 629)
@@ -41,16 +41,13 @@
public void start(String debugInfo) {
senderThread.setName("sender-thread-"+debugInfo+"-"+senderThread.getId());
- //Log.info("Launching thread "+senderThread.getName());
senderThread.start();
}
public void cleanup() {
cleaned = true;
- Log.info("About to shut down the client proto of the sender queue...");
clientProto.shutdown();
if (messageQueue != null) {
- Log.info("About to close the message queue associated with the SenderQueue");
messageQueue.close();
}
}
@@ -83,7 +80,6 @@
Message message = (Message) messageQueue.dequeue();
unsafeSendMessage(message);
} catch (Throwable e) {
- //Log.error("Could not send message [aborting thread:"+Thread.currentThread().getName()+"]:"+ e.getClass().getName()+":"+e.getMessage());
cleaned=true;
}
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPChannel.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPChannel.java 2007-12-13 01:29:24 UTC (rev 628)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPChannel.java 2007-12-13 01:29:36 UTC (rev 629)
@@ -66,7 +66,6 @@
if (needAReaderThread) {
readerThread = new TCPMessageReader(clientProto, message_handler, this);
readerThread.setName("tcp-reader-"+debugInfo+"-"+readerThread.getId());
- //Log.info("Starting reader thread:"+readerThread.getName());
readerThread.start();
}
@@ -74,7 +73,7 @@
}
public void clientReady(AsyncProto newlyConnectedProto) {
- Log.info("Client connected from: "+newlyConnectedProto.getRemoteLocator());
+ Log.debug("Client connected from: "+newlyConnectedProto.getRemoteLocator());
}
public interface Listener {
public void channelClosed(TCPChannel channel);
@@ -91,9 +90,7 @@
public void cleanup() {
//cleaned = true;
try {
- Log.info("Cleaning up the TCP channel "+getLocalLocator());
if (readerThread!=null) {
- Log.info("Reader thread about to be cleaned up...");
readerThread.cleanup();
}
} catch (Exception e) {
@@ -101,13 +98,11 @@
}
try {
if (senderQueue!=null) {
- Log.info("Sender queue about to be cleaned up...");
senderQueue.cleanup();
}
} catch (Exception e) {
Log.error("TCPChannel: Trying to cleanup to senderQueue:"+(e.getClass().getName()),e);
}
- Log.info("About to tell listener that the TCP channel is now closed.");
listener.channelClosed(this);
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometClient.java 2007-12-13 01:29:24 UTC (rev 628)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometClient.java 2007-12-13 01:29:36 UTC (rev 629)
@@ -62,7 +62,6 @@
}
private static void sendHTTPStartupInfo(Writer wr, String host, String path) throws IOException {
- Log.debug("About to send POST to "+path+" on "+host);
/*sendLine("POST "+path+" HTTP/1.1", wr);
HACK FOR DEALING WITH MOD_PROXY IN APACHE 2.2*/
sendLine("GET "+path+" HTTP/1.1", wr);
@@ -70,7 +69,6 @@
sendLine("Transfer-encoding: chunked",wr);
sendLine("",wr);
wr.flush();
- Log.debug("GET/POST Sent!");
}
private static String getHTTPResponse(InputStream is) throws IOException {
@@ -97,7 +95,7 @@
public static String pullOutNextMessage(StringBuffer buff) {
//if you have no "$" then you are right at the front
if (buff.indexOf("$")==-1) {
- Log.info("Unusual buffer situation, no $ found yet out of "+buff.length()+" chars...");
+ Log.warn("Unusual buffer situation, no $ found yet out of "+buff.length()+" chars...");
return null;
}
int result = CometClient.pullOutCommandPart(buff);
@@ -105,7 +103,6 @@
return null;
}
if (result== CometClient.CMD_BUFFERED) {
- //Log.info("Buffered partial packet of "+buff.length()+" chars...");
return null;
}
//the result is the size of the substring we want
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometProto.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometProto.java 2007-12-13 01:29:24 UTC (rev 628)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometProto.java 2007-12-13 01:29:36 UTC (rev 629)
@@ -98,7 +98,6 @@
}
public void shutdown() {
- Log.info("Shutting down Comet Proto, flushing...");
if (writer != null) {
try {
writer.flush();
@@ -110,7 +109,6 @@
//client side
if (needsChunking) {
try {
- Log.info("Closing client-side connection to server since we are shutting down. ("+(writer==null)+")");
if (writer!=null) {
writer.close();
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/Log.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/Log.java 2007-12-13 01:29:24 UTC (rev 628)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/Log.java 2007-12-13 01:29:36 UTC (rev 629)
@@ -47,7 +47,7 @@
}
static SimpleLogger simple = new SimpleLogger();
- static boolean haveLog4J = false;
+ public static boolean haveLog4J = false;
static Object reallyALogger=null;
static Object reallyTheSpaceLogger=null;
static boolean faultedInAlready=false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|