Author: epbernard
Date: 2010-07-14 14:28:01 -0400 (Wed, 14 Jul 2010)
New Revision: 19950
Modified:
search/trunk/hibernate-search/src/main/java/org/hibernate/search/backend/impl/BatchedQueueingProcessor.java
Log:
Make trace level log cleaner on work queue logging
Modified:
search/trunk/hibernate-search/src/main/java/org/hibernate/search/backend/impl/BatchedQueueingProcessor.java
===================================================================
---
search/trunk/hibernate-search/src/main/java/org/hibernate/search/backend/impl/BatchedQueueingProcessor.java 2010-07-14
18:27:22 UTC (rev 19949)
+++
search/trunk/hibernate-search/src/main/java/org/hibernate/search/backend/impl/BatchedQueueingProcessor.java 2010-07-14
18:28:01 UTC (rev 19950)
@@ -278,11 +278,15 @@
public void performWorks(WorkQueue workQueue) {
List<LuceneWork> sealedQueue = workQueue.getSealedQueue();
if ( log.isTraceEnabled() ) {
- StringBuilder sb = new StringBuilder( "Lucene WorkQueue to send to backend:
\n\t" );
+ StringBuilder sb = new StringBuilder( "Lucene WorkQueue to send to backend:[
\n\t" );
for ( LuceneWork lw : sealedQueue ) {
sb.append( lw.toString() );
sb.append( "\n\t" );
}
+ if ( sealedQueue.size() > 0 ) {
+ sb.deleteCharAt( sb.length() - 1 );
+ }
+ sb.append( "]" );
log.trace( sb.toString() );
}
Runnable processor = backendQueueProcessorFactory.getProcessor( sealedQueue );
Show replies by date