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 113171 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/hyades/logging/adapter/outputters/CBELogOutputter.java (-2 / +18 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2005,2006 IBM Corporation and others.
2
 * Copyright (c) 2005,2006,2007 IBM Corporation and others.
3
 * All rights reserved.   This program and the accompanying materials
3
 * All rights reserved.   This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 24-29 Link Here
24
import org.eclipse.hyades.logging.core.LoggingAgent;
24
import org.eclipse.hyades.logging.core.LoggingAgent;
25
import org.eclipse.hyades.logging.events.cbe.CommonBaseEvent;
25
import org.eclipse.hyades.logging.events.cbe.CommonBaseEvent;
26
import org.eclipse.hyades.logging.events.cbe.util.EventFormatter;
26
import org.eclipse.hyades.logging.events.cbe.util.EventFormatter;
27
import org.eclipse.hyades.logging.adapter.util.Messages;
27
import org.w3c.dom.Element;
28
import org.w3c.dom.Element;
28
import org.w3c.dom.Node;
29
import org.w3c.dom.Node;
29
import org.w3c.dom.NodeList;
30
import org.w3c.dom.NodeList;
Lines 68-76 Link Here
68
	private CommonBaseEvent[] processCBEs(CommonBaseEvent[] events)
69
	private CommonBaseEvent[] processCBEs(CommonBaseEvent[] events)
69
	{
70
	{
70
		int cbesReturned = 0;
71
		int cbesReturned = 0;
72
		// If the Agent Controller is not available then just return because the
73
		// events cannot be sent to the client.
74
		if ( !cbelogger.isAgentControllerAvailable()) {
75
			// log a message
76
		    CommonBaseEvent event = getEventFactory().createCommonBaseEvent();
77
		    event.getMsgDataElement().setMsgCatalogId("HyadesGA_CBE_Log_Outputter_AgentControllerUnavailable_ERROR_");							    
78
			event.setSeverity(CommonBaseEvent.SEVERITY_CRITICAL);
79
			log(event);
80
			return events;
81
		}
71
82
72
		// If the agent is not being monitored then wait for it to be so. Only wait if it is the first time.
83
		// If the agent is not being monitored then wait for it to be so. Only wait if it is the first time.
73
		
84
				
74
		if (firstEvents && events.length > 0 && !cbelogger.isLogging() && waitTime >= 0) {
85
		if (firstEvents && events.length > 0 && !cbelogger.isLogging() && waitTime >= 0) {
75
86
76
		    CommonBaseEvent event = getEventFactory().createCommonBaseEvent();
87
		    CommonBaseEvent event = getEventFactory().createCommonBaseEvent();
Lines 281-286 Link Here
281
		}
292
		}
282
		
293
		
283
		firstEvents = true;
294
		firstEvents = true;
295
		if (!cbelogger.isAgentControllerAvailable()) {
296
			// Agent Controller is not available so throw an exception
297
			throw new AdapterInvalidConfig(Messages.getString("HyadesGA_CBE_Log_Outputter_AgentControllerUnavailable_ERROR_"));
298
		}
299
284
	}
300
	}
285
301
286
	/**
302
	/**
(-)src/org/eclipse/hyades/logging/adapter/util/properties/messages.properties (+2 lines)
Lines 181-186 Link Here
181
HyadesGAContextInstanceConfiguration_Month_Value_Invalid_ERROR_ = IWAT0451E The value {0} of the attribute {1} of {2} is invalid.  It must be an integer value between 1 and 12.
181
HyadesGAContextInstanceConfiguration_Month_Value_Invalid_ERROR_ = IWAT0451E The value {0} of the attribute {1} of {2} is invalid.  It must be an integer value between 1 and 12.
182
HyadesGAContextInstanceConfiguration_Day_Value_Invalid_ERROR_ = IWAT0452E The value {0} of the attribute {1} of {2} is invalid.  It must be an integer value between 1 and 31.
182
HyadesGAContextInstanceConfiguration_Day_Value_Invalid_ERROR_ = IWAT0452E The value {0} of the attribute {1} of {2} is invalid.  It must be an integer value between 1 and 31.
183
HyadesGAContextInstanceConfiguration_Timezone_Value_Invalid_ERROR_ = IWAT0453E The value {0} of the attribute {1} of {2} is invalid.  It must be a timezone offset from GMT in the format specified in RFC 822.  For example, -0500.
183
HyadesGAContextInstanceConfiguration_Timezone_Value_Invalid_ERROR_ = IWAT0453E The value {0} of the attribute {1} of {2} is invalid.  It must be a timezone offset from GMT in the format specified in RFC 822.  For example, -0500.
184
HyadesGA_CBE_Log_Outputter_AgentControllerUnavailable_ERROR_=IWAT0323E Common Base Event Logging Agent outputter cannot communicate with Agent Controller. Ensure Agent Controller is running and Agent Controller native libraries are accessible.
185
184
 
186
 
185
HyadesGABufferedPeriodicReader_Log_File_Read_Failed_ERROR_ = IWAT0476E Failed to read log file {0}.  Exception: {1}
187
HyadesGABufferedPeriodicReader_Log_File_Read_Failed_ERROR_ = IWAT0476E Failed to read log file {0}.  Exception: {1}
186
HyadesGABufferedPeriodicReader_No_Records_Read_ERROR_ = IWAT0477E No records were found in log file {0}.
188
HyadesGABufferedPeriodicReader_No_Records_Read_ERROR_ = IWAT0477E No records were found in log file {0}.

Return to bug 113171