Logo Search packages:      
Sourcecode: jaminid version File versions  Download package

void com::prolixtech::utils::JavaLogger::log ( Level  vel,
String  msg 
) [inline]

The main logging function is set by default to output to the console. If we require better logging in the future, perhaps a number of streams will be made. The default operation prints the last function called (gets it through a stacktrace) the message, the time.

vel the level of the message to log.
See also:
msg the message to log.

Implements com::prolixtech::utils::MboxLogger.

Definition at line 79 of file JavaLogger.java.

Referenced by fine(), http(), info(), severe(), sql(), and warning().


        StackTraceElement[] astrel = (new Throwable()).getStackTrace();

        String callingClass = "";

        for (int i = 0; i < astrel.length; i++) {
            StackTraceElement strel = astrel[i];
            callingClass = (strel.getClassName());
            if (!callingClass.endsWith(".SingletonLogger"))

        callingClass = callingClass
                .substring(callingClass.lastIndexOf(".") + 1);

        logger.log(vel, "[" + callingClass + "] " + msg);


Generated by  Doxygen 1.6.0   Back to index