From f02779712077c8dddddf803f2ba54323ec0929ac Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 9 Feb 2005 19:55:31 +0000 Subject: [PATCH] Added some more info to some logging, cleaned up formatting of logging. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3339 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/media/sound/SoundManager.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/java/com/threerings/media/sound/SoundManager.java b/src/java/com/threerings/media/sound/SoundManager.java index 752448eaf..66089093c 100644 --- a/src/java/com/threerings/media/sound/SoundManager.java +++ b/src/java/com/threerings/media/sound/SoundManager.java @@ -260,7 +260,8 @@ public class SoundManager boolean queued = enqueue(skey, true); if (queued) { if (_verbose.getValue()) { - Log.info("Sound request [key=" + skey.key + "]."); + Log.info("Sound request [key=" + skey.key + + ", age=" + skey.getAge() + "]."); } } else /* if (_verbose.getValue()) */ { @@ -499,7 +500,7 @@ public class SoundManager data = (byte[][]) _clipCache.get(key); if (verbose && data != null) { - Log.info("clip loaded from cache [" + key + "]."); + Log.info("Clip loaded from cache [key=" + key.key + "]."); } // see if it's in the locked cache (we first look in the regular @@ -508,7 +509,7 @@ public class SoundManager if (data == null) { data = (byte[][]) _lockedClips.get(key); if (verbose && data != null) { - Log.info("clip loaded from lock [" + key + "]."); + Log.info("Clip loaded from lock [key=" + key.key + "]."); } } @@ -534,7 +535,8 @@ public class SoundManager data[ii] = loadClipData(bundle, names[ii]); } if (verbose) { - Log.info("clip loaded from rscmgr [" + key + "]."); + Log.info("Clip loaded from rsrcmgr [key=" + key.key + + "]."); } } @@ -754,6 +756,12 @@ public class SoundManager return (stamp + MAX_SOUND_DELAY < System.currentTimeMillis()); } + // for debugging + public long getAge () + { + return System.currentTimeMillis() - stamp; + } + // documentation inherited public String toString () {