protected void logExtended ( HttpRequest request , HttpResponse response , Writer log ) throws IOException { String referer = request . getField ( HttpFields . __Referer ) ; if ( referer == null ) log . write ( "\"-\" " ) ; else { log . write ( ' ' ) ; log . write ( referer ) ; log . write ( "\" " ) ; } String agent = request . getField ( HttpFields . __UserAgent ) ; if ( agent == null ) log . write ( "\"-\"" ) ; else { log . write ( ' ' ) ; log . write ( agent ) ; log . write ( ' ' ) ; } }
Log Extended fields . This method can be extended by a derived class to add extened fields to each log entry . It is called by the log method after all standard fields have been added but before the line terminator . Derived implementations should write extra fields to the Writer provided . The default implementation writes the referer and user agent .