From: Yurii R. <yr...@us...> - 2003-02-08 08:23:51
|
Update of /cvsroot/eas-dev/eas-dev/components/logger/src In directory sc8-pr-cvs1:/tmp/cvs-serv23957/components/logger/src Modified Files: Makefile.am consolelogger.cxx consolelogger.hxx logger.cxx sysloglogger.cxx sysloglogger.hxx Log Message: Improved openeas.rdb building (w/ site common.rdb); some minor additions to `logger' components; misc changes at the rest Index: Makefile.am =================================================================== RCS file: /cvsroot/eas-dev/eas-dev/components/logger/src/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.am 8 Feb 2003 03:26:20 -0000 1.4 +++ Makefile.am 8 Feb 2003 08:23:47 -0000 1.5 @@ -12,6 +12,6 @@ lib_LTLIBRARIES = liblogger.la liblogger_la_SOURCES = logger.cxx consolelogger.cxx sysloglogger.cxx -INCLUDES = -I../../.include -I@top_include@ -I@ODK_PATH@/include +INCLUDES = -I../../.incs -I@top_include@ -I@ODK_PATH@/include liblogger_la_LIBADD = $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STLPORTLIB) -lstdc++ liblogger_la_LDFLAGS = -L/opt/openoffice/program/ -L@ODK_PATH@/linux/lib Index: consolelogger.cxx =================================================================== RCS file: /cvsroot/eas-dev/eas-dev/components/logger/src/consolelogger.cxx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- consolelogger.cxx 8 Feb 2003 03:26:20 -0000 1.5 +++ consolelogger.cxx 8 Feb 2003 08:23:47 -0000 1.6 @@ -53,6 +53,9 @@ using namespace com::sun::star::registry; using namespace ::org::openeas::util; +#define CONSOLELOGGERIMPLNAME "org.openeas.util.XConsoleLogger" +#define SERVICENAME "org.openeas.util.Logger" + class XConsoleLoggerImpl: public XConsoleLogger, public XServiceInfo { Reference<XMultiServiceFactory> m_xServiceManager; @@ -100,11 +103,17 @@ cout.flush(); } - virtual bool SAL_CALL isSupported() + virtual sal_Bool SAL_CALL isSupported() throw (RuntimeException) { return true; // we assume that console is available everywhere. // however, it is an issue to check (FIXME) + } + + virtual sal_Bool SAL_CALL mandates(logOption aLO) + throw (RuntimeException) + { + return false; // FIXME? } }; Index: consolelogger.hxx =================================================================== RCS file: /cvsroot/eas-dev/eas-dev/components/logger/src/consolelogger.hxx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- consolelogger.hxx 8 Feb 2003 03:26:20 -0000 1.5 +++ consolelogger.hxx 8 Feb 2003 08:23:47 -0000 1.6 @@ -6,6 +6,14 @@ #include <org/openeas/util/XConsoleLogger.hpp> #endif +#ifndef _ORG_OPENEAS_UTIL_LOGOPTION_HPP +#include <org/openeas/util/logOption.hpp> +#endif + +#ifndef _ORG_OPENEAS_UTIL_LOGLEVEL_HPP +#include <org/openeas/util/logLevel.hpp> +#endif + using namespace ::rtl; using namespace ::osl; using namespace ::cppu; @@ -16,6 +24,7 @@ using namespace ::org::openeas::util; #define CONSOLELOGGERIMPLNAME "org.openeas.util.XConsoleLogger" +#define SERVICENAME "org.openeas.util.Logger" class XConsoleLoggerImpl: public XConsoleLogger, public XServiceInfo { @@ -53,7 +62,9 @@ throw (RuntimeException); virtual void SAL_CALL log(const OUString& message) throw (RuntimeException); - virtual bool SAL_CALL isSupported(); + virtual sal_Bool SAL_CALL isSupported() + throw (RuntimeException); + virtual sal_Bool SAL_CALL mandates(logOption aLO) throw (RuntimeException); Sequence<OUString> SAL_CALL getImplementations() throw (RuntimeException); }; Index: logger.cxx =================================================================== RCS file: /cvsroot/eas-dev/eas-dev/components/logger/src/logger.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- logger.cxx 8 Feb 2003 03:26:20 -0000 1.6 +++ logger.cxx 8 Feb 2003 08:23:47 -0000 1.7 @@ -67,6 +67,7 @@ Mutex m_mutex; sal_Int32 m_nRefCount; sal_Bool m_ignore[8]; + OUString m_ident; Reference<XLoggerHandler> m_handler; @@ -122,6 +123,12 @@ { if (xHandler->isSupported()) m_handler = xHandler; + } + + virtual void SAL_CALL setIdentifier(const OUString& aIdent) + throw (RuntimeException) + { + m_ident = aIdent; } }; Index: sysloglogger.cxx =================================================================== RCS file: /cvsroot/eas-dev/eas-dev/components/logger/src/sysloglogger.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sysloglogger.cxx 8 Feb 2003 03:26:20 -0000 1.1 +++ sysloglogger.cxx 8 Feb 2003 08:23:47 -0000 1.2 @@ -45,6 +45,7 @@ #include <org/openeas/util/XSyslogLogger.hpp> #endif + using namespace ::rtl; using namespace ::osl; using namespace ::cppu; @@ -53,8 +54,8 @@ using namespace com::sun::star::registry; using namespace ::org::openeas::util; -#define CONSOLELOGGERIMPLNAME "org.openeas.util.SyslogLogger" -#define SERVICENAME "org.openeas.util.Logger" +#define CONSOLELOGGERIMPLNAME "org.openeas.util.XSyslogLogger" +#define SERVICENAME "org.openeas.util.Logger" class XSyslogLoggerImpl: public XSyslogLogger, public XServiceInfo { @@ -99,11 +100,12 @@ throw (RuntimeException) { // utf-8 is temporary, need to make it better + // rewrite to syslog! cout << OUStringToOString(message,RTL_TEXTENCODING_UTF8).getStr() << endl; cout.flush(); } - virtual bool SAL_CALL isSupported() + virtual sal_Bool SAL_CALL isSupported() throw (RuntimeException) { #ifdef HAVE_SYSLOG @@ -111,6 +113,12 @@ #else return false; #endif + } + + virtual sal_Bool SAL_CALL mandates(logOption aLO) + throw (RuntimeException) + { + return false; // FIXME! } }; Index: sysloglogger.hxx =================================================================== RCS file: /cvsroot/eas-dev/eas-dev/components/logger/src/sysloglogger.hxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sysloglogger.hxx 8 Feb 2003 03:26:20 -0000 1.1 +++ sysloglogger.hxx 8 Feb 2003 08:23:47 -0000 1.2 @@ -6,6 +6,14 @@ #include <org/openeas/util/XSyslogLogger.hpp> #endif +#ifndef _ORG_OPENEAS_UTIL_LOGOPTION_HPP +#include <org/openeas/util/logOption.hpp> +#endif + +#ifndef _ORG_OPENEAS_UTIL_LOGLEVEL_HPP +#include <org/openeas/util/logLevel.hpp> +#endif + using namespace ::rtl; using namespace ::osl; using namespace ::cppu; @@ -16,6 +24,7 @@ using namespace ::org::openeas::util; #define SYSLOGLOGGERIMPLNAME "org.openeas.util.XSyslogLogger" +#define SERVICENAME "org.openeas.util.Logger" class XSyslogLoggerImpl: public XSyslogLogger, public XServiceInfo { @@ -53,7 +62,9 @@ throw (RuntimeException); virtual void SAL_CALL log(const OUString& message) throw (RuntimeException); - virtual bool SAL_CALL isSupported(); + virtual sal_Bool SAL_CALL isSupported() + throw (RuntimeException); + virtual sal_Bool SAL_CALL mandates(logOption aLO) throw (RuntimeException); Sequence<OUString> SAL_CALL getImplementations() throw (RuntimeException); }; |