00001 #ifndef loggingLocalFile_H 00002 #define loggingLocalFile_H 00003 00004 /******************************************************************************* 00005 * ALMA - Atacama Large Millimiter Array 00006 * (c) European Southern Observatory, 2002 00007 * Copyright by ESO (in the framework of the ALMA collaboration) 00008 * and Cosylab 2002, All rights reserved 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2.1 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public 00021 * License along with this library; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00023 * 00024 * "@(#) $Id: loggingLocalFile.h,v 1.35 2009/01/26 06:45:26 cparedes Exp $" 00025 * 00026 * who when what 00027 * -------- ---------- ---------------------------------------------- 00028 * msekoran 2001-12-17 created. 00029 */ 00030 00031 #ifndef __cplusplus 00032 #error This is a C++ include file and cannot be used from plain C 00033 #endif 00034 00035 #include <acsutil.h> 00036 #include <loggingExport.h> 00037 #include <loggingCacheLogger.h> 00038 00039 #include <ace/Log_Record.h> 00040 #include <ace/Log_Msg_Backend.h> 00041 00045 class logging_EXPORT LocalFileLogger : public CacheLogger 00046 { 00047 public: 00049 LocalFileLogger (); 00050 00052 virtual ~LocalFileLogger (void); 00053 00055 virtual int open (const ACE_TCHAR * filename = 0); 00056 00058 virtual int reset (void); 00059 00061 virtual int close (void); 00062 00066 virtual ssize_t log (ACE_Log_Record &log_record); 00067 00069 virtual ssize_t log (int priority, const ACE_TCHAR * msg); 00070 00072 virtual const ACE_TCHAR * getIdentification(); 00073 00075 virtual const ACE_TCHAR * getDestination(); 00076 00077 private: 00078 00080 FILE * m_file; 00081 00083 ACE_TCHAR * m_fileName; 00084 00086 int m_newLineLen; 00087 00088 }; 00089 00090 #endif /* loggingLocalFile_H */ 00091 00092 // ************************************************************************ 00093 // 00094 // REVISION HISTORY: 00095 // 00096 // $Log: loggingLocalFile.h,v $ 00097 // Revision 1.35 2009/01/26 06:45:26 cparedes 00098 // Changing from int to ssize_t 00099 // 00100 // Revision 1.34 2003/03/14 10:24:37 rgeorgie 00101 // LGPL 00102 // 00103 // Revision 1.33 2002/09/23 12:43:06 vltsccm 00104 // msekoran: loggingXMLParser fixed, memory leak removed and tat test added. 00105 // 00106 // Revision 1.32 2002/04/10 14:41:39 vltsccm 00107 // logging1.32 00108 // 00109 // Revision 1.31 2002/03/27 16:44:24 vltsccm 00110 // logging1.31 00111 // 00112 // Revision 1.30 2002/02/13 12:55:32 vltsccm 00113 // logging1.30 00114 // 00115 // Revision 1.29 2002/02/08 13:40:54 vltsccm 00116 // logging1.29 00117 // 00118 // Revision 1.28 2002/02/05 17:51:55 vltsccm 00119 // logging1.28 00120 // 00121 // Revision 1.27 2002/02/04 08:26:29 vltsccm 00122 // logging1.27 00123 // 00124 // Revision 1.26 2002/01/18 09:42:59 vltsccm 00125 // logging1.26 00126 // 00127 // Revision 1.25 2002/01/16 10:41:29 vltsccm 00128 // logging1.25 00129 // 00130 // Revision 1.24 2002/01/15 12:42:20 vltsccm 00131 // logging1.24 00132 // 00133 // Revision 1.23 2002/01/14 21:10:49 vltsccm 00134 // logging1.23 00135 // 00136 // Revision 1.22 2001/12/27 19:04:09 vltsccm 00137 // logging1.22 00138 // 00139 // Revision 1.21 2001/12/24 13:31:19 vltsccm 00140 // logging1.21 00141 // 00142 // Revision 1.20 2001/12/24 13:31:19 vltsccm 00143 // logging1.20 00144 // 00145 // Revision 1.19 2001/12/24 13:31:19 vltsccm 00146 // logging1.19 00147 // 00148 // Revision 1.18 2001/12/24 13:31:18 vltsccm 00149 // logging1.18 00150 // 00151 // Revision 1.17 2001/12/24 13:31:18 vltsccm 00152 // logging1.17 00153 // 00154 // Revision 1.16 2001/12/24 13:31:18 vltsccm 00155 // logging1.16 00156 // 00157 // Revision 1.15 2001/12/24 13:31:17 vltsccm 00158 // logging1.15 00159 // 00160 // Revision 1.14 2001/12/24 13:31:17 vltsccm 00161 // logging1.14 00162 // 00163 // Revision 1.13 2001/12/24 13:31:17 vltsccm 00164 // logging1.13 00165 // 00166 // Revision 1.12 2001/12/24 13:31:16 vltsccm 00167 // logging1.12 00168 // 00169 // Revision 1.11 2001/12/24 13:31:16 vltsccm 00170 // logging1.11 00171 // 00172 // Revision 1.10 2001/12/24 13:31:16 vltsccm 00173 // logging1.10 00174 // 00175 // Revision 1.9 2001/12/24 13:31:15 vltsccm 00176 // logging1.9 00177 // 00178 // Revision 1.8 2001/12/24 13:31:15 vltsccm 00179 // logging1.8 00180 // 00181 // Revision 1.7 2001/12/24 13:31:15 vltsccm 00182 // logging1.7 00183 // 00184 // Revision 1.6 2001/12/24 13:31:14 vltsccm 00185 // logging1.6 00186 // 00187 // Revision 1.5 2001/12/24 13:31:14 vltsccm 00188 // logging1.5 00189 // 00190 // Revision 1.4 2001/12/24 13:31:14 vltsccm 00191 // logging1.4 00192 // 00193 // Revision 1.3 2001/12/24 13:31:13 vltsccm 00194 // logging1.3 00195 // 00196 // Revision 1.2 2001/12/24 13:31:13 vltsccm 00197 // logging1.2 00198 // 00199 // Revision 1.1 2001/12/24 13:31:13 vltsccm 00200 // logging1.1 00201 // 00202 // Revision 1.0 2001/12/24 13:31:13 vltsccm 00203 // logging1.0 00204 // 00205 // 00206 // ************************************************************************