summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortpf <tpf@openoffice.org>2002-03-04 16:11:01 +0000
committertpf <tpf@openoffice.org>2002-03-04 16:11:01 +0000
commit842704fd9b60a36db777a5b9518ce063accfad82 (patch)
treee6b17be433eed363631697722f7db0dd999494d7
parent97e176c9a128a47c22e4e968912c6978d8e500a9 (diff)
#97825# changed XLogger interfaces to obey the JDK 1.4 final interfaces
-rw-r--r--udkapi/com/sun/star/util/logging/XLogger.idl177
-rw-r--r--udkapi/com/sun/star/util/logging/XLoggerRemote.idl195
-rw-r--r--udkapi/com/sun/star/util/logging/makefile.mk6
3 files changed, 83 insertions, 295 deletions
diff --git a/udkapi/com/sun/star/util/logging/XLogger.idl b/udkapi/com/sun/star/util/logging/XLogger.idl
index db31aba035a5..9d8085ada8a5 100644
--- a/udkapi/com/sun/star/util/logging/XLogger.idl
+++ b/udkapi/com/sun/star/util/logging/XLogger.idl
@@ -2,9 +2,9 @@
*
* $RCSfile: XLogger.idl,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: tpf $ $Date: 2002-01-14 17:20:20 $
+ * last change: $Author: tpf $ $Date: 2002-03-04 17:11:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,175 +71,68 @@
module com { module sun { module star { module util { module logging {
//=============================================================================
-/** logging interface
+/** Local logging interface derived from the final 1.4 j2sdk java.util.logging
+ interface. For speedup the XLoggerRemote interface should be used by any
+ component implementing this interface for remote communication.
+ This will enable some prechecks before the costly remote logging call is
+ made.
*/
interface XLogger: com::sun::star::uno::XInterface
{
-
- //-------------------------------------------------------------------------
/** Just to adhere to the API known from the standalone scenario.
You can use it to create a new Logger, but to bootstrap the first
- logger you need a createINstanceWithArguments(string logger)
+ logger you need a createInstanceWithArguments(string logger)
or equivalent.
@param host
host of the caller
- */
-
- XLogger getLogger( [in] string logger );
-
- //-------------------------------------------------------------------------
- /** Sets the pid of the caller once (performance).
-
- @param PID
- PID of the caller
- */
-
- [oneway] boolean isLoggable( [in] long level );
-
- //-------------------------------------------------------------------------
- /** Log a SEVERE message.
-
- @param sourceClass
- name of class that issued the logging request
-
- @param sourceMethod
- name of method that issued the logging request
-
- @param msg
- the string message
-
- @param thread
- client thread that initially called this method
- */
-
- [oneway] void severe( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg );
-
- //-------------------------------------------------------------------------
- /** Log a WARNING message.
-
- @param sourceClass
- name of class that issued the logging request
-
- @param sourceMethod
- name of method that issued the logging request
-
- @param msg
- the string message
-
- @param thread
- client thread that initially called this method
- */
-
- [oneway] void warning( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg );
-
- //-------------------------------------------------------------------------
- /** Log an INFO message.
-
- @param sourceClass
- name of class that issued the logging request
-
- @param sourceMethod
- name of method that issued the logging request
- @param msg
- the string message
-
- @param thread
- client thread that initially called this method
+ @returns XLogger instance
*/
- [oneway] void info( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg );
+ XLogger getLogger( [in] string name );
//-------------------------------------------------------------------------
- /** Log a CONFIG message.
-
- @param sourceClass
- name of class that issued the logging request
- @param sourceMethod
- name of method that issued the logging request
-
- @param msg
- the string message
+ /** gets logging level of this XLogger
- @param thread
- client thread that initially called this method
+ @returns logging level of this XLogger
*/
- [oneway] void config( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg );
+ long getLevel();
//-------------------------------------------------------------------------
- /** Log a FINE message.
- @param sourceClass
- name of class that issued the logging request
-
- @param sourceMethod
- name of method that issued the logging request
+ /** gets name of this XLogger
- @param msg
- the string message
-
- @param thread
- client thread that initially called this method
+ @returns name of this XLogger
*/
- [oneway] void fine( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg );
+ string getName();
//-------------------------------------------------------------------------
- /** Log a FINER message.
- @param sourceClass
- name of class that issued the logging request
+ /** will this XLogger instance produce any output for the given level?
+ can be used to optimize performance as maybe complex parameter evaluation
+ in the logp call can be omitted if isLoggable evaluates to false
- @param sourceMethod
- name of method that issued the logging request
-
- @param msg
- the string message
+ @param level
+ level to be checked against
- @param thread
- client thread that initially called this method
+ @returns true if there will be some output for this XLogger for the given level,
+ false otherwise
*/
- [oneway] void finer( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg );
+ boolean isLoggable( [in] long level );
//-------------------------------------------------------------------------
- /** Log a FINEST message.
-
- @param sourceClass
- name of class that issued the logging request
-
- @param sourceMethod
- name of method that issued the logging request
-
- @param msg
- the string message
-
- @param thread
- client thread that initially called this method
- */
- [oneway] void finest( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg );
+ /** Log a message. The p in logp is derived from "precise" as given
+ is the java.util.logging API
- //-------------------------------------------------------------------------
- /** Log a message.
+ @param level
+ the log level of this message
@param sourceClass
name of class that issued the logging request
@@ -247,20 +140,14 @@ interface XLogger: com::sun::star::uno::XInterface
@param sourceMethod
name of method that issued the logging request
- @param level
- the log level of this message
-
@param msg
the string message
-
- @param thread
- client thread that initially called this method
*/
- [oneway] void log( [in] string sourceClass,
- [in] string sourceMethod,
- [in] long level,
- [in] string msg );
+ [oneway] void logp( [in] long level,
+ [in] string sourceClass,
+ [in] string sourceMethod,
+ [in] string msg );
};
//=============================================================================
diff --git a/udkapi/com/sun/star/util/logging/XLoggerRemote.idl b/udkapi/com/sun/star/util/logging/XLoggerRemote.idl
index 9ff6c87f8ad2..7d40eb481145 100644
--- a/udkapi/com/sun/star/util/logging/XLoggerRemote.idl
+++ b/udkapi/com/sun/star/util/logging/XLoggerRemote.idl
@@ -2,9 +2,9 @@
*
* $RCSfile: XLoggerRemote.idl,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: tpf $ $Date: 2002-01-14 17:20:27 $
+ * last change: $Author: tpf $ $Date: 2002-03-04 17:11:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,152 +75,64 @@
module com { module sun { module star { module util { module logging {
//=============================================================================
-/** logging interface
-*/
-
-interface XLoggerRemote: com::sun::star::uno::XInterface
-{
- //-------------------------------------------------------------------------
- /** adds a properties change listener that informs the client if some
- performance relevant data changed on server side.
- For now we just transmit the LogLevel thus we do not need any remote
- calls just for checking the need to log.
-
- @param listener
- properties change listener
- */
-
- [oneway] void addPropertiesChangeListener(
- [in] com::sun::star::beans::XPropertiesChangeListener listener);
+/** Remote logging interface. The twin of XLogger. This interface will do the
+ remote communication. Differences compared with XLogger:
- //-------------------------------------------------------------------------
- /** Log a SEVERE message.
+ getLogger() is omitted as createInstance will suffice here.
+ No need to obey to the java API here.
- @param sourceClass
- name of class that issued the logging request
+ getName() and isLoggable() are added here just in case.
+ Normally these two can be handled by XLogger without using this interface.
- @param sourceMethod
- name of method that issued the logging request
+ logp() contains an additional parameter "thread" which enables the server
+ to display the client thread of this call
- @param msg
- the string message
-
- @param thread
- client thread that initially called this method
- */
-
- [oneway] void severe( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg,
- [in] string thread );
-
- //-------------------------------------------------------------------------
- /** Log a WARNING message.
-
- @param sourceClass
- name of class that issued the logging request
-
- @param sourceMethod
- name of method that issued the logging request
+ addPropertiesChangeListener() is used to register a call back with the server.
+ This enables ther server to communicate any changes in the configuration
+ to the client. The client can use this info to do some prechecks thus
+ avoiding unneccessary remote calls.
+*/
- @param msg
- the string message
+interface XLoggerRemote: com::sun::star::uno::XInterface
+{
+ /** gets logging level of this XLoggerRemote
- @param thread
- client thread that initially called this method
+ @returns logging level of this XLoggerRemote
*/
- [oneway] void warning( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg,
- [in] string thread );
+ long getLevel();
//-------------------------------------------------------------------------
- /** Log an INFO message.
- @param sourceClass
- name of class that issued the logging request
+ /** gets name of this XLoggerRemote
- @param sourceMethod
- name of method that issued the logging request
-
- @param msg
- the string message
-
- @param thread
- client thread that initially called this method
+ @returns name of this XLoggerRemote
*/
- [oneway] void info( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg,
- [in] string thread );
+ string getName();
//-------------------------------------------------------------------------
- /** Log a CONFIG message.
- @param sourceClass
- name of class that issued the logging request
+ /** will this XLoggerRemote produce any output for the given level?
+ can be used to optimize performance as maybe complex parameter evaluation
+ in the logp call can be omitted if isLoggable evaluates to false
- @param sourceMethod
- name of method that issued the logging request
-
- @param msg
- the string message
-
- @param thread
- client thread that initially called this method
- */
-
- [oneway] void config( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg,
- [in] string thread );
-
- //-------------------------------------------------------------------------
- /** Log a FINE message.
-
- @param sourceClass
- name of class that issued the logging request
-
- @param sourceMethod
- name of method that issued the logging request
-
- @param msg
- the string message
+ @param level
+ level to be checked against
- @param thread
- client thread that initially called this method
+ @returns true if there will be some output for this XLoggerRemote for the given level,
+ false otherwise
*/
- [oneway] void fine( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg,
- [in] string thread );
+ boolean isLoggable( [in] long level );
//-------------------------------------------------------------------------
- /** Log a FINER message.
-
- @param sourceClass
- name of class that issued the logging request
-
- @param sourceMethod
- name of method that issued the logging request
-
- @param msg
- the string message
- @param thread
- client thread that initially called this method
- */
-
- [oneway] void finer( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg,
- [in] string thread );
+ /** Log a message. The p in logp is derived from "precise" as given
+ is the java.util.logging API
- //-------------------------------------------------------------------------
- /** Log a FINEST message.
+ @param level
+ the log level of this message
@param sourceClass
name of class that issued the logging request
@@ -235,36 +147,25 @@ interface XLoggerRemote: com::sun::star::uno::XInterface
client thread that initially called this method
*/
- [oneway] void finest( [in] string sourceClass,
- [in] string sourceMethod,
- [in] string msg,
- [in] string thread );
+ [oneway] void logp( [in] long level,
+ [in] string sourceClass,
+ [in] string sourceMethod,
+ [in] string msg,
+ [in] string thread );
//-------------------------------------------------------------------------
- /** Log a message.
- @param sourceClass
- name of class that issued the logging request
-
- @param sourceMethod
- name of method that issued the logging request
-
- @param level
- the log level of this message
-
- @param msg
- the string message
+ /** adds a properties change listener that informs the client if some
+ performance relevant data changed on server side.
+ For now we just transmit the LogLevel thus we do not need any remote
+ calls just for checking the need to log.
- @param thread
- client thread that initially called this method
+ @param listener
+ properties change listener
*/
- [oneway] void log( [in] string sourceClass,
- [in] string sourceMethod,
- [in] long level,
- [in] string msg,
- [in] string thread );
-
+ [oneway] void addPropertiesChangeListener(
+ [in] com::sun::star::beans::XPropertiesChangeListener listener);
};
//=============================================================================
diff --git a/udkapi/com/sun/star/util/logging/makefile.mk b/udkapi/com/sun/star/util/logging/makefile.mk
index d17ce9f7eda0..89ac040457c8 100644
--- a/udkapi/com/sun/star/util/logging/makefile.mk
+++ b/udkapi/com/sun/star/util/logging/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.1 $
+# $Revision: 1.2 $
#
-# last change: $Author: tpf $ $Date: 2002-01-14 17:20:07 $
+# last change: $Author: tpf $ $Date: 2002-03-04 17:11:01 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -71,7 +71,7 @@ PACKAGE =com$/sun$/star$/util$/logging
# ------------------------------------------------------------------------
IDLFILES=\
- XLevel.idl\
+ Level.idl\
XLogger.idl\
XLoggerRemote.idl\
Logger.idl\