dist/bower_components/log4js/log4js/src/main/js/log4js.js
function() {
		if(this.loggingEventMap.length() >0) {
			
			log4jsLogger.trace("> AjaxAppender.send");
			
			
			this.isInProgress = true;
			var a = [];
	
			for(var i = 0; i < this.loggingEventMap.length() && i < this.threshold; i++) {
				a.push(this.layout.format(this.loggingEventMap.pull()));
			} 
					
			var content = this.layout.getHeader();	
			content += a.join(this.layout.getSeparator());
			content += this.layout.getFooter();
			
			var appender = this;
			if(this.httpRequest === null){
				this.httpRequest = this.getXmlHttpRequest();
			}
			this.httpRequest.onreadystatechange = function() {
				appender.onReadyStateChanged.call(appender);
			};
			
			this.httpRequest.open("POST", this.loggingUrl, true);
			// set the request headers.
			this.httpRequest.setRequestHeader("Content-type", this.layout.getContentType());
			this.httpRequest.send( content );
			
			appender = this;
			
			try {
				window.setTimeout(function(){
					log4jsLogger.trace("> AjaxAppender.timeout");
					appender.httpRequest.onreadystatechange = function(){return;};
					appender.httpRequest.abort();
					//this.httpRequest = null;
					appender.isInProgress = false;
		
					if(appender.loggingEventMap.length() > 0) {
						appender.send();
					}
					log4jsLogger.trace("< AjaxAppender.timeout");
				}, this.timeout);
			} catch (e) {
				log4jsLogger.fatal(e);
			}
			log4jsLogger.trace("> AjaxAppender.send");
		}
	}
function() {
		if(this.loggingEventMap.length() >0) {
			
			log4jsLogger.trace("> AjaxAppender.send");
			
			
			this.isInProgress = true;
			var a = [];
	
			for(var i = 0; i < this.loggingEventMap.length() && i < this.threshold; i++) {
				a.push(this.layout.format(this.loggingEventMap.pull()));
			} 
					
			var content = this.layout.getHeader();	
			content += a.join(this.layout.getSeparator());
			content += this.layout.getFooter();
			
			var appender = this;
			if(this.httpRequest === null){
				this.httpRequest = this.getXmlHttpRequest();
			}
			this.httpRequest.onreadystatechange = function() {
				appender.onReadyStateChanged.call(appender);
			};
			
			this.httpRequest.open("POST", this.loggingUrl, true);
			// set the request headers.
			this.httpRequest.setRequestHeader("Content-type", this.layout.getContentType());
			this.httpRequest.send( content );
			
			appender = this;
			
			try {
				window.setTimeout(function(){
					log4jsLogger.trace("> AjaxAppender.timeout");
					appender.httpRequest.onreadystatechange = function(){return;};
					appender.httpRequest.abort();
					//this.httpRequest = null;
					appender.isInProgress = false;
		
					if(appender.loggingEventMap.length() > 0) {
						appender.send();
					}
					log4jsLogger.trace("< AjaxAppender.timeout");
				}, this.timeout);
			} catch (e) {
				log4jsLogger.fatal(e);
			}
			log4jsLogger.trace("> AjaxAppender.send");
		}
	}
function ( ) { if ( this . loggingEventMap . length ( ) > 0 ) { log4jsLogger . trace ( "> AjaxAppender.send" ) ; this . isInProgress = true ; var a = [ ] ; for ( var i = 0 ; i < this . loggingEventMap . length ( ) && i < this . threshold ; i ++ ) { a . push ( this . layout . format ( this . loggingEventMap . pull ( ) ) ) ; } var content = this . layout . getHeader ( ) ; content += a . join ( this . layout . getSeparator ( ) ) ; content += this . layout . getFooter ( ) ; var appender = this ; if ( this . httpRequest === null ) { this . httpRequest = this . getXmlHttpRequest ( ) ; } this . httpRequest . onreadystatechange = function ( ) { appender . onReadyStateChanged . call ( appender ) ; } ; this . httpRequest . open ( "POST" , this . loggingUrl , true ) ; // set the request headers. this . httpRequest . setRequestHeader ( "Content-type" , this . layout . getContentType ( ) ) ; this . httpRequest . send ( content ) ; appender = this ; try { window . setTimeout ( function ( ) { log4jsLogger . trace ( "> AjaxAppender.timeout" ) ; appender . httpRequest . onreadystatechange = function ( ) { return ; } ; appender . httpRequest . abort ( ) ; //this.httpRequest = null; appender . isInProgress = false ; if ( appender . loggingEventMap . length ( ) > 0 ) { appender . send ( ) ; } log4jsLogger . trace ( "< AjaxAppender.timeout" ) ; } , this . timeout ) ; } catch ( e ) { log4jsLogger . fatal ( e ) ; } log4jsLogger . trace ( "> AjaxAppender.send" ) ; } }
send the request.
send the request .