• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

loggingLocalSyslog.h

Go to the documentation of this file.
00001 #ifndef loggingLocalSyslog_H
00002 #define loggingLocalSyslog_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: loggingLocalSyslog.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 
00042 #if !defined(MAKE_VXWORKS) && !defined(ACS_HAS_WIN32)
00043 #define ACS_HAS_LOCAL_SYSLOG_CALLS
00044 #endif
00045 
00046 
00047 #ifdef ACS_HAS_LOCAL_SYSLOG_CALLS
00048 
00049 #include <syslog.h>
00050 
00055 class logging_EXPORT LocalSyslogLogger : public CacheLogger
00056 {
00057 public:
00060     LocalSyslogLogger (int facility = LOG_USER);
00061     
00063     virtual ~LocalSyslogLogger (void);
00064     
00066     virtual int open (const ACE_TCHAR * ident = 0);
00067 
00069     virtual int reset (void);
00070 
00072     virtual int close (void);
00073     
00077     virtual ssize_t log (ACE_Log_Record &log_record);
00078 
00080     virtual ssize_t log (int priority, const ACE_TCHAR * msg);
00081     
00083     virtual const ACE_TCHAR * getIdentification();
00084 
00086     virtual const ACE_TCHAR * getDestination();
00087 
00088   private:
00089 
00091     int m_facility;
00092 
00093 };
00094 
00095 #endif       /* ACS_HAS_LOCAL_SYSLOG_CALLS */
00096 
00097 #endif /* loggingLocalSyslog_H */
00098 
00099 // ************************************************************************
00100 //
00101 // REVISION HISTORY:
00102 //
00103 // $Log: loggingLocalSyslog.h,v $
00104 // Revision 1.35  2009/01/26 06:45:26  cparedes
00105 // Changing from int to ssize_t
00106 //
00107 // Revision 1.34  2003/03/14 10:24:37  rgeorgie
00108 // LGPL
00109 //
00110 // Revision 1.33  2002/09/23 12:43:05  vltsccm
00111 // msekoran: loggingXMLParser fixed, memory leak removed and tat test added.
00112 //
00113 // Revision 1.32  2002/04/10 14:41:39  vltsccm
00114 // logging1.32
00115 //
00116 // Revision 1.31  2002/03/27 16:44:23  vltsccm
00117 // logging1.31
00118 //
00119 // Revision 1.30  2002/02/13 12:55:31  vltsccm
00120 // logging1.30
00121 //
00122 // Revision 1.29  2002/02/08 13:40:54  vltsccm
00123 // logging1.29
00124 //
00125 // Revision 1.28  2002/02/05 17:51:55  vltsccm
00126 // logging1.28
00127 //
00128 // Revision 1.27  2002/02/04 08:26:28  vltsccm
00129 // logging1.27
00130 //
00131 // Revision 1.26  2002/01/18 09:42:58  vltsccm
00132 // logging1.26
00133 //
00134 // Revision 1.25  2002/01/16 10:41:29  vltsccm
00135 // logging1.25
00136 //
00137 // Revision 1.24  2002/01/15 12:42:20  vltsccm
00138 // logging1.24
00139 //
00140 // Revision 1.23  2002/01/14 21:10:49  vltsccm
00141 // logging1.23
00142 //
00143 // Revision 1.22  2001/12/27 19:04:09  vltsccm
00144 // logging1.22
00145 //
00146 // Revision 1.21  2001/12/24 13:31:12  vltsccm
00147 // logging1.21
00148 //
00149 // Revision 1.20  2001/12/24 13:31:12  vltsccm
00150 // logging1.20
00151 //
00152 // Revision 1.19  2001/12/24 13:31:12  vltsccm
00153 // logging1.19
00154 //
00155 // Revision 1.18  2001/12/24 13:31:11  vltsccm
00156 // logging1.18
00157 //
00158 // Revision 1.17  2001/12/24 13:31:11  vltsccm
00159 // logging1.17
00160 //
00161 // Revision 1.16  2001/12/24 13:31:11  vltsccm
00162 // logging1.16
00163 //
00164 // Revision 1.15  2001/12/24 13:31:10  vltsccm
00165 // logging1.15
00166 //
00167 // Revision 1.14  2001/12/24 13:31:10  vltsccm
00168 // logging1.14
00169 //
00170 // Revision 1.13  2001/12/24 13:31:10  vltsccm
00171 // logging1.13
00172 //
00173 // Revision 1.12  2001/12/24 13:31:09  vltsccm
00174 // logging1.12
00175 //
00176 // Revision 1.11  2001/12/24 13:31:09  vltsccm
00177 // logging1.11
00178 //
00179 // Revision 1.10  2001/12/24 13:31:09  vltsccm
00180 // logging1.10
00181 //
00182 // Revision 1.9  2001/12/24 13:31:08  vltsccm
00183 // logging1.9
00184 //
00185 // Revision 1.8  2001/12/24 13:31:08  vltsccm
00186 // logging1.8
00187 //
00188 // Revision 1.7  2001/12/24 13:31:08  vltsccm
00189 // logging1.7
00190 //
00191 // Revision 1.6  2001/12/24 13:31:07  vltsccm
00192 // logging1.6
00193 //
00194 // Revision 1.5  2001/12/24 13:31:07  vltsccm
00195 // logging1.5
00196 //
00197 // Revision 1.4  2001/12/24 13:31:07  vltsccm
00198 // logging1.4
00199 //
00200 // Revision 1.3  2001/12/24 13:31:06  vltsccm
00201 // logging1.3
00202 //
00203 // Revision 1.2  2001/12/24 13:31:06  vltsccm
00204 // logging1.2
00205 //
00206 // Revision 1.1  2001/12/24 13:31:06  vltsccm
00207 // logging1.1
00208 //
00209 // Revision 1.0  2001/12/24 13:31:06  vltsccm
00210 // logging1.0
00211 //
00212 //
00213 // ************************************************************************

Generated on Thu Jan 12 2012 23:13:51 for ACS-10.0 C++ API by  doxygen 1.7.0