01: /**
02: * $Id: Debug.java,v 1.1 2005/04/04 21:22:06 jtb Exp $
03: * Copyright 2005 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.community.mc.impl;
14:
15: import java.io.PrintStream;
16:
17: /**
18: * Utility class to log messages.
19: *
20: * This should be used for debugging purposes only.
21: */
22: public class Debug {
23: private static PrintStream out = System.out;
24:
25: private Debug() {
26: // nothing
27: }
28:
29: public static void log(String classname, String methodname,
30: String msg) {
31: out.println(classname + "." + methodname + "(): " + msg);
32: }
33:
34: public static void log(String classname, String methodname,
35: Throwable t) {
36: out.println(classname + "." + methodname + "(): "
37: + t.getMessage());
38: t.printStackTrace(out);
39: }
40: }
|