Switch to new samskivert logging API.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5134 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-05-27 19:25:38 +00:00
parent 821760366f
commit 919112cf88
80 changed files with 440 additions and 573 deletions
@@ -30,7 +30,7 @@ import com.threerings.util.Name;
import com.threerings.presents.client.Client;
import com.threerings.presents.net.UsernamePasswordCreds;
import com.threerings.crowd.Log;
import static com.threerings.crowd.Log.log;
/**
* The main point of entry for the Jabber client application. It creates
@@ -62,7 +62,7 @@ public class JabberApp
Client client = _client.getContext().getClient();
// pass them on to the client
Log.info("Using [server=" + server + "].");
log.info("Using [server=" + server + "].");
client.setServer(server, Client.DEFAULT_SERVER_PORTS);
// configure the client with some credentials and logon
@@ -96,8 +96,7 @@ public class JabberApp
// initialize the app
app.init();
} catch (IOException ioe) {
Log.warning("Error initializing application.");
Log.logStackTrace(ioe);
log.warning("Error initializing application.", ioe);
}
// and run it
@@ -32,10 +32,11 @@ import com.threerings.presents.client.*;
import com.threerings.presents.dobj.DObjectManager;
import com.threerings.presents.net.*;
import com.threerings.crowd.Log;
import com.threerings.crowd.chat.client.ChatDirector;
import com.threerings.crowd.util.CrowdContext;
import static com.threerings.crowd.Log.log;
public class TestClient
implements RunQueue, ClientObserver
{
@@ -89,7 +90,7 @@ public class TestClient
public void clientDidLogon (Client client)
{
Log.info("Client did logon [client=" + client + "].");
log.info("Client did logon [client=" + client + "].");
// request to move to a place
_ctx.getLocationDirector().moveTo(15);
@@ -97,30 +98,30 @@ public class TestClient
public void clientObjectDidChange (Client client)
{
Log.info("Client object did change [client=" + client + "].");
log.info("Client object did change [client=" + client + "].");
}
public void clientFailedToLogon (Client client, Exception cause)
{
Log.info("Client failed to logon [client=" + client +
log.info("Client failed to logon [client=" + client +
", cause=" + cause + "].");
}
public void clientConnectionFailed (Client client, Exception cause)
{
Log.info("Client connection failed [client=" + client +
log.info("Client connection failed [client=" + client +
", cause=" + cause + "].");
}
public boolean clientWillLogoff (Client client)
{
Log.info("Client will logoff [client=" + client + "].");
log.info("Client will logoff [client=" + client + "].");
return true;
}
public void clientDidLogoff (Client client)
{
Log.info("Client did logoff [client=" + client + "].");
log.info("Client did logoff [client=" + client + "].");
System.exit(0);
}
@@ -3,10 +3,11 @@
package com.threerings.crowd.server;
import com.threerings.crowd.Log;
import com.threerings.crowd.data.JabberConfig;
import com.threerings.crowd.data.PlaceObject;
import static com.threerings.crowd.Log.log;
/**
* A basic server that creates a single room and sticks everyone in it
* where they can chat with one another.
@@ -30,8 +31,7 @@ public class JabberServer extends CrowdServer
server.init();
server.run();
} catch (Exception e) {
Log.warning("Unable to initialize server.");
Log.logStackTrace(e);
log.warning("Unable to initialize server.", e);
}
}