/**
 * Filename    : cerny.conf.js
 * Author      : Robert Cerny
 * Created     : 2007-03-17
 * Last Change : 2007-03-17
 */

if (typeof CERNY != 'object') {
    CERNY = {};
}

CERNY.Configuration = {
    Logger: {
        "indentStr": "  ",
        "CERNY": "OFF",
        // "CERNY.intercept": "TRACE",
        "CERNY.js.Array": "OFF",
        "NONE": "OFF",
        "CO": "OFF"
    },
    Catalog: {
    },
    Interception: {
        active: []
    }
};

/**
 * Configure the Cerny.js lib. Takes effect only after the
 * configuration cut (call of this function in cerny.js).
 */
CERNY.configure = function() {

    // Define the interceptors of your choice
    // CERNY.Configuration.Interception.active.push(CERNY.Interceptors.LogIndenter);
    // CERNY.Configuration.Interception.active.push(CERNY.Interceptors.Profiler);
    // CERNY.Configuration.Interception.active.push(CERNY.Interceptors.Tracer);
    // CERNY.Configuration.Interception.active.push(CERNY.Interceptors.TypeChecker);

    // Redefine the log layout. The default is copied here from
    // cerny.js. Modify to match your requirements.
    // CERNY.Logger.layout = function(date, levelName, indentStr, message, loggerName) {
    //     return date.getTime() + ", " + levelName + ": " + indentStr + message + " | " + loggerName;
    // };

    // Redefine the log appenders. The default is [CERNY.print]. An
    // appender is a function taking one string parameter, the message
    // to be logged.
    // CERNY.Logger.appenders = [];
}

CERNY.print = function(message) {

    // Browser is considered the default runtime environment
    alert(message);

    // JsUnit
    // debug(message);

    // Rhino
    // print(message);
}
