00001 /* 00002 * ALMA - Atacama Large Millimiter Array 00003 * (c) European Southern Observatory, 2002 00004 * Copyright by ESO (in the framework of the ALMA collaboration) 00005 * and Cosylab 2002, All rights reserved 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00020 * MA 02111-1307 USA 00021 */ 00022 #ifndef _LOGGING_IDL 00023 #define _LOGGING_IDL 00024 00025 #include <DsLogAdmin.idl> 00026 00027 #pragma prefix "alma" 00028 00029 00030 00048 module AcsLogLevels { 00049 00050 typedef short logLevelValue; 00051 00052 // In the past we used the value 0 for UNKNOWN or ALL without formal definition. 00053 // Now we try without the 0 until we need it. 00054 00055 const logLevelValue TRACE_VAL = 2; 00056 const string TRACE_NAME = "Trace"; 00057 00058 const logLevelValue DEBUG_VAL = 3; 00059 const string DEBUG_NAME = "Debug"; 00060 00061 const logLevelValue INFO_VAL = 4; 00062 const string INFO_NAME = "Info"; 00063 00064 const logLevelValue NOTICE_VAL = 5; 00065 const string NOTICE_NAME = "Notice"; 00066 00067 const logLevelValue WARNING_VAL = 6; 00068 const string WARNING_NAME = "Warning"; 00069 00070 // anomaly: value 7 is not defined! 00071 00072 const logLevelValue ERROR_VAL = 8; 00073 const string ERROR_NAME = "Error"; 00074 00075 const logLevelValue CRITICAL_VAL = 9; 00076 const string CRITICAL_NAME = "Critical"; 00077 00078 const logLevelValue ALERT_VAL = 10; 00079 const string ALERT_NAME = "Alert"; 00080 00081 const logLevelValue EMERGENCY_VAL = 11; 00082 const string EMERGENCY_NAME = "Emergency"; 00083 00084 // The proposed value 99 is more human friendly. Technically it would make more sense 00085 // to define OFF_VAL as the maximum allowed value (2^15 - 1). 00086 const logLevelValue OFF_VAL = 99; 00087 const string OFF_NAME = "Off"; 00088 }; 00089 00090 00094 module ACSLoggingLog { 00095 00096 struct NameValue { 00097 string name; 00098 string value; // any ? -> use than Property from Property Service 00099 }; 00100 00101 typedef sequence<NameValue> NameValueSeq; 00102 00108 /* 00109 enum LogType { 00110 Unknown, 00111 Shutdown, 00112 Trace, 00113 Debug, 00114 Info, 00115 Notice, 00116 Warning, 00117 Startup, 00118 Error, 00119 Critical, 00120 Alert, 00121 Emergency, 00122 Archive 00123 }; 00124 */ 00125 /* 00126 Header, 00127 Description, 00128 History, 00129 Meta, 00130 Data, 00131 Alarm, 00132 */ 00133 00137 struct LogBinaryRecord { 00138 AcsLogLevels::logLevelValue type; 00139 string TimeStamp; 00140 string File; 00141 unsigned long Line; 00142 string Routine; 00143 string SourceObject; 00144 string Host; 00145 string Process; 00146 string LogContext; 00147 string Thread; 00148 string StackId; 00149 long StackLevel; 00150 string LogId; 00151 long Priority; 00152 string Uri; 00153 string Audience; 00154 string Array; 00155 string Antenna; 00156 string MsgData; 00157 00161 NameValueSeq attributes; 00162 NameValueSeq log_data; 00163 00164 }; 00165 00166 }; 00167 00168 00169 module Logging 00170 { 00174 struct XmlLogRecord{ 00175 // xml string that represents the Log 00176 string xml; 00177 00178 // Log level of the log record 00179 AcsLogLevels::logLevelValue logLevel; 00180 }; 00181 00185 struct LogStatistics{ 00189 unsigned long long receivedLogs; 00190 }; 00191 00192 typedef sequence<XmlLogRecord> XmlLogRecordSeq; 00193 00194 00195 interface AcsLogService : DsLogAdmin::BasicLog 00196 { 00200 void writeRecords(in XmlLogRecordSeq xmlLogRecords); 00201 00207 LogStatistics getStatistics(); 00208 00209 }; 00210 00211 interface ACSLogFactory : DsLogAdmin::BasicLogFactory 00212 { 00213 }; 00214 }; 00215 00216 00217 #endif
1.6.2