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 const logLevelValue TRACE_VAL = 1; 00053 const string TRACE_NAME = "Trace"; 00054 00055 // see COMP-3749 which describes this introduction of a new level between TRACE and DEBUG after ACS 8.1.0 00056 const logLevelValue DELOUSE_VAL = 2; 00057 const string DELOUSE_NAME = "Delouse"; 00058 00059 const logLevelValue DEBUG_VAL = 3; 00060 const string DEBUG_NAME = "Debug"; 00061 00062 const logLevelValue INFO_VAL = 4; 00063 const string INFO_NAME = "Info"; 00064 00065 const logLevelValue NOTICE_VAL = 5; 00066 const string NOTICE_NAME = "Notice"; 00067 00068 const logLevelValue WARNING_VAL = 6; 00069 const string WARNING_NAME = "Warning"; 00070 00071 // anomaly: value 7 is not defined! 00072 00073 const logLevelValue ERROR_VAL = 8; 00074 const string ERROR_NAME = "Error"; 00075 00076 const logLevelValue CRITICAL_VAL = 9; 00077 const string CRITICAL_NAME = "Critical"; 00078 00079 const logLevelValue ALERT_VAL = 10; 00080 const string ALERT_NAME = "Alert"; 00081 00082 const logLevelValue EMERGENCY_VAL = 11; 00083 const string EMERGENCY_NAME = "Emergency"; 00084 00085 // The OFF value of 99 is more human friendly. Technically it would make more sense 00086 // to define OFF_VAL as the maximum allowed value (2^15 - 1). 00087 const logLevelValue OFF_VAL = 99; 00088 const string OFF_NAME = "Off"; 00089 }; 00090 00091 00095 module ACSLoggingLog { 00096 00097 struct NameValue { 00098 string name; 00099 string value; // any ? -> use than Property from Property Service 00100 }; 00101 00102 typedef sequence<NameValue> NameValueSeq; 00103 00109 /* 00110 enum LogType { 00111 Unknown, 00112 Shutdown, 00113 Trace, 00114 Debug, 00115 Info, 00116 Notice, 00117 Warning, 00118 Startup, 00119 Error, 00120 Critical, 00121 Alert, 00122 Emergency, 00123 Archive 00124 }; 00125 */ 00126 /* 00127 Header, 00128 Description, 00129 History, 00130 Meta, 00131 Data, 00132 Alarm, 00133 */ 00134 00138 struct LogBinaryRecord { 00139 AcsLogLevels::logLevelValue type; 00140 string TimeStamp; 00141 string File; 00142 unsigned long Line; 00143 string Routine; 00144 string SourceObject; 00145 string Host; 00146 string Process; 00147 string LogContext; 00148 string Thread; 00149 string StackId; 00150 long StackLevel; 00151 string LogId; 00152 long Priority; 00153 string Uri; 00154 string Audience; 00155 string Array; 00156 string Antenna; 00157 string MsgData; 00158 00162 NameValueSeq attributes; 00163 NameValueSeq log_data; 00164 00165 }; 00166 00167 }; 00168 00169 00170 module Logging 00171 { 00175 struct XmlLogRecord{ 00176 // xml string that represents the Log 00177 string xml; 00178 00179 // Log level of the log record 00180 AcsLogLevels::logLevelValue logLevel; 00181 }; 00182 00186 struct LogStatistics{ 00190 unsigned long long receivedLogs; 00191 }; 00192 00193 typedef sequence<XmlLogRecord> XmlLogRecordSeq; 00194 00195 00196 interface AcsLogService : DsLogAdmin::BasicLog 00197 { 00201 void writeRecords(in XmlLogRecordSeq xmlLogRecords); 00202 00208 LogStatistics getStatistics(); 00209 00210 }; 00211 00212 interface ACSLogFactory : DsLogAdmin::BasicLogFactory 00213 { 00214 }; 00215 }; 00216 00217 00218 #endif