-// Copyright (C) 2003 Adam Megacz <adam@ibex.org> all rights reserved.
-//
-// You may modify, copy, and redistribute this code under the terms of
-// the GNU Library Public License version 2.1, with the exception of
-// the portion of clause 6a after the semicolon (aka the "obnoxious
-// relink clause")
+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the Apache Public Source License 2.0 ("the License").
+// You may not use this file except in compliance with the License.
package org.ibex.util;
-import org.ibex.js.*;
import java.io.*;
import java.util.*;
import java.net.*;
logstream.println(classname + colorize(levelcolor, bright, str));
}
- public static void recursiveLog(String indent, String name, Object o) throws JSExn {
- if (!name.equals("")) name += " : ";
-
- if (o == null) {
- JS.log(indent + name + "<null>");
-
- } else if (o instanceof JSArray) {
- JS.log(indent + name + "<array>");
- JSArray na = (JSArray)o;
- for(int i=0; i<na.length(); i++)
- recursiveLog(indent + " ", i + "", na.elementAt(i));
-
- } else if (o instanceof JS) {
- JS.log(indent + name + "<object>");
- JS s = (JS)o;
- Enumeration e = s.keys();
- while(e.hasMoreElements()) {
- Object key = e.nextElement();
- if (key != null)
- recursiveLog(indent + " ", key.toString(),
- (key instanceof Integer) ?
- s.get(((Integer)key)) : s.get(key.toString()));
- }
- } else {
- JS.log(indent + name + o);
-
- }
- }
-
}