         # We put explicit traces before the errors in this function,
         # since otherwise they can be very hard to debug.
         err = "misc.defaults -- TypeError: function takes inputs as an object #{error()}"
-        console.log(err)
+        console.debug(err)
         console.trace()
         if DEBUG
             throw err

                @_calling = false
                if err
                    if @opts.verbose
                        console.log("#{@opts.logname}: error=#{err}")
                    if @opts.max_tries? and @attempts >= @opts.max_tries
                        while @_cb_stack.length > 0
                            @_cb_stack.pop()(err)

    try
        JSON.parse(x)
    catch err
        console.debug("from_json: error parsing #{x} (=#{exports.to_json(x)}) from JSON")
        throw err

# convert to JSON even if there are circular references
