User: andreas
Date: 00/09/08 13:20:39
Modified: src/main/org/jboss/logging ConsoleLogging.java
FileLogging.java Logger.java
Log:
Replace the old JMX jar files by the new final JMX classes
taken from JMX-RI and adjust all the classes to compile
and run smoothly.
Revision Changes Path
1.2 +5 -2 jboss/src/main/org/jboss/logging/ConsoleLogging.java
Index: ConsoleLogging.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/logging/ConsoleLogging.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ConsoleLogging.java 2000/04/22 14:30:13 1.1
+++ ConsoleLogging.java 2000/09/08 20:20:38 1.2
@@ -8,6 +8,7 @@
import java.io.*;
import java.text.*;
+import java.util.Date;
import java.util.StringTokenizer;
import java.util.SortedSet;
import java.util.Comparator;
@@ -18,7 +19,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class ConsoleLogging
implements ConsoleLoggingMBean, MBeanRegistration, NotificationListener
@@ -63,7 +64,8 @@
public synchronized void handleNotification(Notification n,
java.lang.Object handback)
{
- Object[] args = new Object[] { dateFmt.format(n.getTimeStamp()), new
Long(n.getSequenceNumber()), n.getUserData(), n.getType(), n.getMessage() };
+ //AS FIXME this change is just a hack (dateFmt.format(...))
+ Object[] args = new Object[] { dateFmt.format(new Date(n.getTimeStamp())),
new Long(n.getSequenceNumber()), n.getUserData(), n.getType(), n.getMessage() };
if (n.getType().equals("Error") || n.getType().equals("Warning"))
err.println(msgFmt.format(args));
else
@@ -104,3 +106,4 @@
public void postDeregister() {}
}
+
1.4 +4 -2 jboss/src/main/org/jboss/logging/FileLogging.java
Index: FileLogging.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/logging/FileLogging.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FileLogging.java 2000/08/18 03:21:06 1.3
+++ FileLogging.java 2000/09/08 20:20:38 1.4
@@ -8,6 +8,7 @@
import java.io.*;
import java.text.*;
+import java.util.Date;
import java.util.SortedSet;
import java.util.Comparator;
import java.util.TreeSet;
@@ -18,7 +19,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class FileLogging
implements FileLoggingMBean, MBeanRegistration, NotificationListener
@@ -90,7 +91,8 @@
{
if (filter.indexOf(n.getType()) != -1)
{
- Object[] args = new Object[] { dateFmt.format(n.getTimeStamp()), new
Long(n.getSequenceNumber()), n.getUserData(), n.getType(), n.getMessage() };
+ //AS FIXME this change is just a hack (dateFmt.format(...))
+ Object[] args = new Object[] { dateFmt.format(new
Date(n.getTimeStamp())), new Long(n.getSequenceNumber()), n.getUserData(),
n.getType(), n.getMessage() };
out.println(msgFmt.format(args));
}
}
1.4 +3 -2 jboss/src/main/org/jboss/logging/Logger.java
Index: Logger.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/logging/Logger.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Logger.java 2000/06/16 13:10:30 1.3
+++ Logger.java 2000/09/08 20:20:38 1.4
@@ -17,7 +17,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class Logger
extends NotificationBroadcasterSupport
@@ -87,7 +87,8 @@
// Public --------------------------------------------------------
public synchronized void fireNotification(String type, Object source, String
message)
{
- Notification n = new Notification(type, this, sequence++, now, message);
+ //AS FIXME Just a hack (now.getTime())
+ Notification n = new Notification(type, this, sequence++, now.getTime(),
message);
n.setUserData(source);
sendNotification(n);