Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 135531 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/hyades/logging/adapter/util/properties/messages.properties (+2 lines)
Lines 190-195 Link Here
190
HyadesGAContextConfigurationErrorNoConfigurationFatal_ERROR_=IWAT0540E Configuration error: The configuration for context {0} does not exist.
190
HyadesGAContextConfigurationErrorNoConfigurationFatal_ERROR_=IWAT0540E Configuration error: The configuration for context {0} does not exist.
191
191
192
HyadesGA_FilterExit_Invalid_XPATHFilterSpecification_ERROR_=IWAT0541E Invalid XPATH filter specification {0}.
192
HyadesGA_FilterExit_Invalid_XPATHFilterSpecification_ERROR_=IWAT0541E Invalid XPATH filter specification {0}.
193
194
INVALID_LOG_TYPE_INFO_                              = IWAT0812I Zero log record is parsed, it maybe a wrong type of log.
193
 
195
 
194
# Message strings:
196
# Message strings:
195
EXCEPTION                                           = Exception
197
EXCEPTION                                           = Exception
(-)src/org/eclipse/hyades/logging/adapter/impl/BasicContext.java (+22 lines)
Lines 18-23 Link Here
18
import org.eclipse.hyades.logging.adapter.util.Messages;
18
import org.eclipse.hyades.logging.adapter.util.Messages;
19
import org.eclipse.hyades.logging.events.cbe.CommonBaseEvent;
19
import org.eclipse.hyades.logging.events.cbe.CommonBaseEvent;
20
import org.eclipse.hyades.logging.events.cbe.Situation;
20
import org.eclipse.hyades.logging.events.cbe.Situation;
21
import org.eclipse.hyades.logging.adapter.impl.Component;
21
/**
22
/**
22
 * BasicContext provide the simplest possible implementation of a Context.
23
 * BasicContext provide the simplest possible implementation of a Context.
23
 * It is a good example for other custom context implementation
24
 * It is a good example for other custom context implementation
Lines 316-324 Link Here
316
				/* Don't let the listener break us */
317
				/* Don't let the listener break us */
317
			}	
318
			}	
318
		}
319
		}
320
		ISensor sensor= ((ISensor) getComponents()[0]);
321
		
319
		 
322
		 
320
		Object[] flushedSensorContent=((ISensor) getComponents()[0]).flush();
323
		Object[] flushedSensorContent=((ISensor) getComponents()[0]).flush();
321
		
324
		
325
		
322
		if(listener!=null && !isHardStop()) {
326
		if(listener!=null && !isHardStop()) {
323
			try {
327
			try {
324
				listener.postProcessEventItems(getComponents()[0], flushedSensorContent);
328
				listener.postProcessEventItems(getComponents()[0], flushedSensorContent);
Lines 329-335 Link Here
329
		}
333
		}
330
		
334
		
331
		flushMessages(flushedSensorContent, 1);
335
		flushMessages(flushedSensorContent, 1);
336
		//bugziila 135531, If the itemes processed by sensor is bigger than 0, 
337
		//but output is 0. Then the log file could be wrong type.
338
		IComponent compentets[] = getComponents();
339
		if (((Component) (getComponents()[compentets.length - 1])) != null) {
340
			
341
			if (((Component) (getComponents()[0])).getItemsProcessedCount() > 0
342
					&& ((Component) (compentets[compentets.length - 1]))
343
							.getItemsProcessedCount() == 0) {
344
				
345
				CommonBaseEvent event = getEventFactory()
346
						.createCommonBaseEvent();
347
				event.setMsg(Messages.getString("INVALID_LOG_TYPE_INFO_"));
348
				event.setSeverity(CommonBaseEvent.SEVERITY_FATAL);
349
				log(event);
350
351
			}
352
		}
332
		super.stop();
353
		super.stop();
354
		
333
	}
355
	}
334
	/**
356
	/**
335
	 * flushMessages flushes any messages cached by a component to the next component.
357
	 * flushMessages flushes any messages cached by a component to the next component.
(-)src/org/eclipse/hyades/logging/adapter/extractors/SimpleExtractor.java (+1 lines)
Lines 201-206 Link Here
201
				
201
				
202
			}
202
			}
203
			//no filter against the records
203
			//no filter against the records
204
			incrementItemsProcessedCount(tmpMessages.length);
204
			return tmpMessages;
205
			return tmpMessages;
205
			
206
			
206
		}
207
		}

Return to bug 135531