public static final void loge ( Class < ? > clazz , String msg , Exception ... e ) { if ( DEBUG ) { String exceptionStr = "" ; if ( e != null && e . length == 1 ) { StringWriter sw = new StringWriter ( ) ; PrintWriter pw = new PrintWriter ( sw ) ; e [ 0 ] . printStackTrace ( pw ) ; pw . flush ( ) ; exceptionStr = "exception = " + sw . toString ( ) ; } System . err . println ( "[" + sSdf . format ( new Date ( ) ) + "]" + "-" + "[" + clazz . getSimpleName ( ) + "] " + msg + " " + exceptionStr ) ; } }
To output the error log message to the error out