     }
 
     /**
-     * Set the log level for the specified package/file.
-     *
-     * @param spec The smallest prefix desired to configure a log level.
+     * Set the log level for the specified module.
+     *
+     * @param module The smallest prefix desired to configure a log level.
      * For example, you can set the global level with Log.setLevel("", Log.INFO);
      * Then you can Log.setLevel("com.foo.game", Log.DEBUG). Now, everything
-     * logs at INFO level except for classes within com.foo.game, which is at DEBUG.
-     */
-    public static function setLevel (spec :String, level :int) :void
-    {
-        _setLevels[spec] = level;
-        resetLevels();
+     * logs at INFO level except for modules within com.foo.game, which is at DEBUG.
+     */
+    public static function setLevel (module :String, level :int) :void
+    {
+        _setLevels[module] = level;
+        _levels = {}; // reset cached levels
     }
 
     /**


    protected function doLog (level :int, messages :Array) :void
    {
        if (level < getLevel(_spec)) {
            return; // we don't want to log it!
        }
        messages.unshift(getTimeStamp(), LEVEL_NAMES[level], _spec);
        trace.apply(null, messages);

        // possibly also dispatch to any other log targets.


/**
 * A simple logging mechanism.
 *
 * Log instances are created for modules, and the logging level can be configured per
 * module in a hierarchical fashion.
 *
 * Typically, you should create a module name based on the full path to a class:
 * calling getLog() and passing an object or Class will do this. Alternattely, you
 * may create a Log to share in several classes in a package, in which case the
 * module name can be like "com.foocorp.games.bunnywar". Finally, you can just
 * create made-up module names like "mygame" or "util", but this is not recommended.
 * You really should name things based on your packages, and your packages should be
 * named according to Sun's recommendations for Java packages.
 *
 * Typical usage for creating a Log to be used by the entire class would be:
 * public class MyClass
