Switch to new logging API.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@510 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Michael Bayne
2008-05-27 22:55:10 +00:00
parent b521b4bfbf
commit e00b4ddd6b
108 changed files with 497 additions and 605 deletions
@@ -39,9 +39,10 @@ import com.threerings.util.Name;
import com.threerings.presents.client.Client;
import com.threerings.presents.net.UsernamePasswordCreds;
import com.threerings.jme.Log;
import com.threerings.jme.JmeApp;
import static com.threerings.jme.Log.log;
/**
* The main point of entry for the Jabber client application. It creates
* and initializes the myriad components of the client and sets all the
@@ -100,7 +101,7 @@ public class JabberApp extends JmeApp
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
@@ -123,7 +124,7 @@ public class JabberApp extends JmeApp
if (client.isLoggedOn()) {
client.logoff(false);
}
Log.info("Stopping.");
log.info("Stopping.");
super.stop();
}
@@ -22,14 +22,15 @@
package com.threerings.media.sound;
import com.threerings.resource.ResourceManager;
import com.threerings.media.Log;
import static com.threerings.media.Log.log;
public class SoundTestApp
{
public SoundTestApp (String[] args)
{
if (args.length == 0) {
Log.info("Usage: runjava com.threerings.media.SoundTestApp " +
log.info("Usage: runjava com.threerings.media.SoundTestApp " +
"<key1> [<key2> <key3> ...]");
System.exit(0);
}
@@ -38,10 +38,11 @@ import javax.swing.JPanel;
import com.samskivert.swing.VGroupLayout;
import com.samskivert.swing.util.SwingUtil;
import com.threerings.media.Log;
import com.threerings.media.image.ClientImageManager;
import com.threerings.media.image.ImageUtil;
import static com.threerings.media.Log.log;
/**
* Simple application for testing image trace functionality.
*/
@@ -106,8 +107,7 @@ public class TraceViz
app.run();
} catch (Exception e) {
Log.warning("Failed to run application: " + e);
Log.logStackTrace(e);
log.warning("Failed to run application.", e);
}
}
@@ -50,11 +50,12 @@ import com.threerings.cast.CharacterSprite;
import com.threerings.cast.NoSuchComponentException;
import com.threerings.cast.bundle.BundledComponentRepository;
import com.threerings.miso.Log;
import com.threerings.miso.MisoConfig;
import com.threerings.miso.tile.MisoTileManager;
import com.threerings.miso.util.MisoContext;
import static com.threerings.miso.Log.log;
/**
* Tests the scrolling capabilities of the IsoSceneView.
*/
@@ -72,7 +73,7 @@ public class ScrollingTestApp
// get the target graphics device
GraphicsDevice gd = env.getDefaultScreenDevice();
Log.info("Graphics device [dev=" + gd +
log.info("Graphics device [dev=" + gd +
", mem=" + gd.getAvailableAcceleratedMemory() +
", displayChange=" + gd.isDisplayChangeSupported() +
", fullScreen=" + gd.isFullScreenSupported() + "].");
@@ -80,7 +81,7 @@ public class ScrollingTestApp
// get the graphics configuration and display mode information
GraphicsConfiguration gc = gd.getDefaultConfiguration();
DisplayMode dm = gd.getDisplayMode();
Log.info("Display mode [bits=" + dm.getBitDepth() +
log.info("Display mode [bits=" + dm.getBitDepth() +
", wid=" + dm.getWidth() + ", hei=" + dm.getHeight() +
", refresh=" + dm.getRefreshRate() + "].");
@@ -132,7 +133,7 @@ public class ScrollingTestApp
}
} catch (NoSuchComponentException nsce) {
Log.warning("Can't locate ship component [class=" + scclass +
log.warning("Can't locate ship component [class=" + scclass +
", name=" + scname + "].");
}
@@ -159,12 +160,12 @@ public class ScrollingTestApp
// size and position the window, entering full-screen exclusive
// mode if available
if (gd.isFullScreenSupported()) {
Log.info("Entering full-screen exclusive mode.");
log.info("Entering full-screen exclusive mode.");
gd.setFullScreenWindow(_frame);
_frame.setUndecorated(true);
} else {
Log.warning("Full-screen exclusive mode not available.");
log.warning("Full-screen exclusive mode not available.");
// _frame.pack();
_frame.setSize(200, 300);
SwingUtil.centerWindow(_frame);
@@ -173,8 +174,7 @@ public class ScrollingTestApp
try {
_panel.setSceneModel(new ScrollingScene(ctx));
} catch (Exception e) {
Log.warning("Error creating scene: " + e);
Log.logStackTrace(e);
log.warning("Error creating scene.", e);
}
}
@@ -38,12 +38,13 @@ import com.threerings.media.tile.bundle.BundledTileSetRepository;
import com.threerings.cast.CharacterManager;
import com.threerings.cast.bundle.BundledComponentRepository;
import com.threerings.miso.Log;
import com.threerings.miso.data.SimpleMisoSceneModel;
import com.threerings.miso.tile.MisoTileManager;
import com.threerings.miso.tools.xml.SimpleMisoSceneParser;
import com.threerings.miso.util.MisoContext;
import static com.threerings.miso.Log.log;
/**
* The ViewerApp is a scene viewing application that allows for trying
* out game scenes in a pseudo-runtime environment.
@@ -67,7 +68,7 @@ public class ViewerApp
// get the target graphics device
GraphicsDevice gd = env.getDefaultScreenDevice();
Log.info("Graphics device [dev=" + gd +
log.info("Graphics device [dev=" + gd +
", mem=" + gd.getAvailableAcceleratedMemory() +
", displayChange=" + gd.isDisplayChangeSupported() +
", fullScreen=" + gd.isFullScreenSupported() + "].");
@@ -75,7 +76,7 @@ public class ViewerApp
// get the graphics configuration and display mode information
GraphicsConfiguration gc = gd.getDefaultConfiguration();
DisplayMode dm = gd.getDisplayMode();
Log.info("Display mode [bits=" + dm.getBitDepth() +
log.info("Display mode [bits=" + dm.getBitDepth() +
", wid=" + dm.getWidth() + ", hei=" + dm.getHeight() +
", refresh=" + dm.getRefreshRate() + "].");
@@ -109,26 +110,25 @@ public class ViewerApp
SimpleMisoSceneParser parser = new SimpleMisoSceneParser("");
SimpleMisoSceneModel model = parser.parseScene(args[0]);
if (model == null) {
Log.warning("No miso scene found in scene file " +
log.warning("No miso scene found in scene file " +
"[path=" + args[0] + "].");
System.exit(-1);
}
_panel.setSceneModel(model);
} catch (Exception e) {
Log.warning("Unable to parse scene [path=" + args[0] + "].");
Log.logStackTrace(e);
log.warning("Unable to parse scene [path=" + args[0] + "].", e);
System.exit(-1);
}
// size and position the window, entering full-screen exclusive
// mode if available
if (gd.isFullScreenSupported()) {
Log.info("Entering full-screen exclusive mode.");
log.info("Entering full-screen exclusive mode.");
gd.setFullScreenWindow(_frame);
} else {
Log.warning("Full-screen exclusive mode not available.");
log.warning("Full-screen exclusive mode not available.");
// _frame.pack();
_frame.setSize(600, 400);
SwingUtil.centerWindow(_frame);
@@ -42,12 +42,13 @@ import com.threerings.media.util.Path;
import com.threerings.media.util.PerformanceMonitor;
import com.threerings.media.util.PerformanceObserver;
import com.threerings.miso.Log;
import com.threerings.miso.MisoConfig;
import com.threerings.miso.client.MisoScenePanel;
import com.threerings.miso.data.MisoSceneModel;
import com.threerings.miso.util.MisoContext;
import static com.threerings.miso.Log.log;
public class ViewerSceneViewPanel extends MisoScenePanel
implements PerformanceObserver, PathObserver
{
@@ -78,7 +79,7 @@ public class ViewerSceneViewPanel extends MisoScenePanel
public void setSceneModel (MisoSceneModel model)
{
super.setSceneModel(model);
Log.info("Using " + model + ".");
log.info("Using " + model + ".");
}
// documentation inherited
@@ -144,7 +145,7 @@ public class ViewerSceneViewPanel extends MisoScenePanel
// documentation inherited
public void checkpoint (String name, int ticks)
{
Log.info(name + " [ticks=" + ticks + "].");
log.info(name + " [ticks=" + ticks + "].");
}
// documentation inherited
@@ -153,7 +154,7 @@ public class ViewerSceneViewPanel extends MisoScenePanel
super.mousePressed(e);
int x = e.getX(), y = e.getY();
Log.info("Mouse pressed +" + x + "+" + y);
log.info("Mouse pressed +" + x + "+" + y);
switch (e.getModifiers()) {
case MouseEvent.BUTTON1_MASK: