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:
@@ -28,10 +28,11 @@ import java.io.ObjectInputStream;
|
||||
|
||||
import com.samskivert.io.StreamUtil;
|
||||
|
||||
import com.threerings.cast.Log;
|
||||
import com.threerings.resource.FileResourceBundle;
|
||||
import com.threerings.resource.ResourceBundle;
|
||||
|
||||
import static com.threerings.cast.Log.log;
|
||||
|
||||
/**
|
||||
* Utility functions related to creating and manipulating component bundles.
|
||||
*/
|
||||
@@ -80,12 +81,12 @@ public class BundleUtil
|
||||
return new ObjectInputStream(bin).readObject();
|
||||
|
||||
} catch (InvalidClassException ice) {
|
||||
Log.warning("Aiya! Serialized object is hosed [bundle=" + bundle +
|
||||
log.warning("Aiya! Serialized object is hosed [bundle=" + bundle +
|
||||
", element=" + path + ", error=" + ice.getMessage() + "].");
|
||||
return null;
|
||||
|
||||
} catch (IOException ioe) {
|
||||
Log.warning("Error reading resource from bundle [bundle=" + bundle + ", path=" + path +
|
||||
log.warning("Error reading resource from bundle [bundle=" + bundle + ", path=" + path +
|
||||
", wiping?=" + wipeOnFailure + "].");
|
||||
if (wipeOnFailure) {
|
||||
StreamUtil.close(bin);
|
||||
|
||||
@@ -60,11 +60,12 @@ import com.threerings.cast.CharacterComponent;
|
||||
import com.threerings.cast.ComponentClass;
|
||||
import com.threerings.cast.ComponentRepository;
|
||||
import com.threerings.cast.FrameProvider;
|
||||
import com.threerings.cast.Log;
|
||||
import com.threerings.cast.NoSuchComponentException;
|
||||
import com.threerings.cast.StandardActions;
|
||||
import com.threerings.cast.TrimmedMultiFrameImage;
|
||||
|
||||
import static com.threerings.cast.Log.log;
|
||||
|
||||
/**
|
||||
* A component repository implementation that obtains information from resource bundles.
|
||||
*
|
||||
@@ -227,7 +228,7 @@ public class BundledComponentRepository
|
||||
// look up the component class information
|
||||
ComponentClass clazz = (ComponentClass)_classes.get(cclass);
|
||||
if (clazz == null) {
|
||||
Log.warning("Non-existent component class [class=" + cclass + ", name=" + cname +
|
||||
log.warning("Non-existent component class [class=" + cclass + ", name=" + cname +
|
||||
", id=" + componentId + "].");
|
||||
return;
|
||||
}
|
||||
@@ -247,7 +248,7 @@ public class BundledComponentRepository
|
||||
if (!comps.contains(component)) {
|
||||
comps.add(component);
|
||||
} else {
|
||||
Log.info("Requested to register the same component twice? [comp=" + component + "].");
|
||||
log.info("Requested to register the same component twice? [comp=" + component + "].");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,7 +287,7 @@ public class BundledComponentRepository
|
||||
// obtain the action sequence definition for this action
|
||||
ActionSequence actseq = (ActionSequence)_actions.get(action);
|
||||
if (actseq == null) {
|
||||
Log.warning("Missing action sequence definition [action=" + action +
|
||||
log.warning("Missing action sequence definition [action=" + action +
|
||||
", component=" + component + "].");
|
||||
return null;
|
||||
}
|
||||
@@ -330,7 +331,7 @@ public class BundledComponentRepository
|
||||
// if this is a shadow or crop image, no need to freak out as they are optional
|
||||
if (!StandardActions.CROP_TYPE.equals(type) &&
|
||||
!StandardActions.SHADOW_TYPE.equals(type)) {
|
||||
Log.warning("Unable to locate tileset for action '" + imgpath + "' " +
|
||||
log.warning("Unable to locate tileset for action '" + imgpath + "' " +
|
||||
component + ".");
|
||||
if (_wipeOnFailure && _bundle instanceof FileResourceBundle) {
|
||||
((FileResourceBundle)_bundle).wipeBundle(false);
|
||||
@@ -344,8 +345,7 @@ public class BundledComponentRepository
|
||||
return new TileSetFrameImage(aset, actseq);
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.warning("Error loading tset for action '" + imgpath + "' " + component + ".");
|
||||
Log.logStackTrace(e);
|
||||
log.warning("Error loading tset for action '" + imgpath + "' " + component + ".", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user