1 #ifndef CONFIGMGR_SIMPLELOGGER_HXX_
2 #define CONFIGMGR_SIMPLELOGGER_HXX_
4 #include "simplelogger.hxx"
5 #include <com/sun/star/util/logging/XLogger.hpp>
6 #include <com/sun/star/lang/XServiceInfo.hpp>
7 #include <com/sun/star/uno/XComponentContext.hpp>
8 #include <cppuhelper/implbase2.hxx>
14 namespace uno
= com::sun::star::uno
;
15 namespace lang
= com::sun::star::lang
;
16 namespace logging
= com::sun::star::util::logging
;
19 typedef cppu::WeakImplHelper2
< logging::XLogger
,
20 lang::XServiceInfo
> LoggerBase
;
24 Class implementing the Logger service
26 class SimpleLogger
: public LoggerBase
30 Service constructor from a service factory.
32 @param xContext component context
35 SimpleLogger( const uno::Reference
<uno::XComponentContext
>& xContext
, char const * name
) ;
41 virtual uno::Reference
< logging::XLogger
> SAL_CALL
42 getLogger( const OUString
& name
)
43 throw (uno::RuntimeException
);
45 virtual sal_Int32 SAL_CALL
getLevel( ) throw (uno::RuntimeException
);
46 virtual OUString SAL_CALL
getName( ) throw (uno::RuntimeException
);
47 virtual sal_Bool SAL_CALL
isLoggable( sal_Int32 level
) throw (uno::RuntimeException
);
50 logp( sal_Int32 level
, const OUString
& sourceClass
, const OUString
& sourceMethod
, const OUString
& msg
)
51 throw (uno::RuntimeException
);
54 virtual OUString SAL_CALL
getImplementationName()
55 throw (uno::RuntimeException
) ;
57 virtual sal_Bool SAL_CALL
supportsService( const OUString
& aServiceName
)
58 throw (uno::RuntimeException
) ;
60 virtual uno::Sequence
<OUString
> SAL_CALL
61 getSupportedServiceNames(void) throw (uno::RuntimeException
) ;
64 Provides the implementation name.
66 @return implementation name
68 static OUString SAL_CALL
getImplementationName_static() ;
70 Provides the list of supported services.
72 @return list of service names
74 static uno::Sequence
<OUString
> SAL_CALL
getSupportedServiceNames_static() ;
77 /** Component Context */
78 uno::Reference
<uno::XComponentContext
> mContext
;