Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## opencard.core.util
Class Tracer

    java.lang.Object
      opencard.core.util.Tracer

    public class Tracer

extends java.lang.Object

Utility class for tracing. Each class that wants its operations traced needs to instantiate a `Tracer` object specifying a tag to enable it by. Tracing at runtime is controlled through the set of tags configured in the opencard.tracer property:

`tag`
  Trace all messages submitted under `tag` or any tag beginning with `tag`
`tag:level`
  Trace all message with a level greater or equal to `level` submitted under `tag` or any tag beginning with `tag`

Version:
  $Id: Tracer.java,v 1.1.1.1 1999/10/05 15:34:32 damke Exp $
Author:
  Peter Trommler (trp@zurich.ibm.com), Mike Wendler (mwendler@de.ibm.com), Stephan Breideneich (sbreiden@de.ibm.com)

Constructor Summary
`Tracer(java.lang.Class clazz)` Traces a certain class.
`Tracer(java.lang.Object me, java.lang.Class clazz)` Traces a certain class.
`Tracer(java.lang.Object me, java.lang.String className)` Constructs a tracer for a certain object with the name of its class.

Method Summary
`static void` | `addTracerListener(TracerListener listener)` Adds a `TracerListener`.
`void` | `alert(java.lang.String meth, java.lang.String msg)` Traces a `ALERT` level message.
`void` | `alert(java.lang.String meth, java.lang.Throwable frisbee)` Traces a `ALERT` throwable
`void` | `critical(java.lang.String meth, java.lang.String msg)` Traces a `CRITICAL` level message.
`void` | `critical(java.lang.String meth, java.lang.Throwable frisbee)` Traces a `CRITICAL` throwable
`void` | `debug(java.lang.String meth, java.lang.String msg)` Traces a `DEBUG` level message.
`void` | `debug(java.lang.String meth, java.lang.Throwable frisbee)` Traces a `DEBUG` throwable
`void` | `emergency(java.lang.String meth, java.lang.String msg)` Traces a `EMERGENCY` level message.
`void` | `emergency(java.lang.String meth, java.lang.Throwable frisbee)` Trace a `EMERGENCY` throwable
`void` | `error(java.lang.String meth, java.lang.String msg)` Traces a `ERROR` level message.
`void` | `error(java.lang.String meth, java.lang.Throwable frisbee)` Traces a `ERROR` throwable
`int` | `getTraceLevel()` Gets the current trace level of the tracer of a certain class/object.
`void` | `info(java.lang.String meth, java.lang.String msg)` Traces a `INFO` level message.
`void` | `info(java.lang.String meth, java.lang.Throwable frisbee)` Traces a `INFO` throwable
`static void` | `init()` Initialize tracing by parsing trace properties into tracelist
`void` | `notice(java.lang.String meth, java.lang.String msg)` Traces a `NOTICE` level message.
`void` | `notice(java.lang.String meth, java.lang.Throwable frisbee)` Traces a `NOTICE` throwable
`static void` | `removeTracerListener(TracerListener listener)` Removes a `TracerListener`.
`protected void` | `trace(int level, java.lang.String meth, java.lang.String message)` Adds a trace message.
`protected void` | `trace(int level, java.lang.String meth, java.lang.Throwable frisbee)` Traces the stack trace of the `Throwable`.
`static void` | `trace(java.lang.Object me, java.lang.String className, int level, java.lang.String meth, java.lang.String message, java.lang.Throwable frisbee)` Adds a message to the trace.
`void` | `warning(java.lang.String meth, java.lang.String msg)` Traces a `WARNING` level message.
`void` | `warning(java.lang.String meth, java.lang.Throwable frisbee)` Trace a `WARNING` throwable

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Tracer

    public Tracer(java.lang.Object me,
                  java.lang.String className)

  Constructs a tracer for a certain object with the name of its class.

  Parameters:
    `me` - The object that instantiates the tracer.
    `className` - Name identifying the type of trace

### Tracer

    public Tracer(java.lang.Object me,
                  java.lang.Class clazz)

  Traces a certain class.

  Parameters:
    `me` - The object that instantiates the tracer.
    `clazz` - the class to be traced

### Tracer

    public Tracer(java.lang.Class clazz)

  Traces a certain class.

  Parameters:
    `clazz` - the class to be traced

Method Detail

### init

    public static void init()

  Initialize tracing by parsing trace properties into tracelist

### getTraceLevel

    public int getTraceLevel()

  Gets the current trace level of the tracer of a certain class/object.

  Returns:
    the trace level of this' tracer's class or `-1` if this class is not to be traced at all

### trace

    public static void trace(java.lang.Object me,
                             java.lang.String className,
                             int level,
                             java.lang.String meth,
                             java.lang.String message,
                             java.lang.Throwable frisbee)

  Adds a message to the trace.

  Parameters:
    `level` - The debug level.
    `className` - The class name of the source.
    `me` - The source object.
    `meth` - The method name.
    `message` - The trace message
    `frisbee` - The `Trowable` to trace

### trace

    protected void trace(int level,
                         java.lang.String meth,
                         java.lang.String message)

  Adds a trace message.

  Parameters:
    `message` - The trace message.

### trace

    protected void trace(int level,
                         java.lang.String meth,
                         java.lang.Throwable frisbee)

  Traces the stack trace of the `Throwable`.

  Parameters:
    `level` - The trace level for this trace event.
    `meth` - The name of the method that generates this trace event.
    `frisbee` - The `Throwable` to trace.

### debug

    public void debug(java.lang.String meth,
                      java.lang.String msg)

  Traces a `DEBUG` level message.

### debug

    public void debug(java.lang.String meth,
                      java.lang.Throwable frisbee)

  Traces a `DEBUG` throwable

### info

    public void info(java.lang.String meth,
                     java.lang.String msg)

  Traces a `INFO` level message.

### info

    public void info(java.lang.String meth,
                     java.lang.Throwable frisbee)

  Traces a `INFO` throwable

### notice

    public void notice(java.lang.String meth,
                       java.lang.String msg)

  Traces a `NOTICE` level message.

### notice

    public void notice(java.lang.String meth,
                       java.lang.Throwable frisbee)

  Traces a `NOTICE` throwable

### warning

    public void warning(java.lang.String meth,
                        java.lang.String msg)

  Traces a `WARNING` level message.

### warning

    public void warning(java.lang.String meth,
                        java.lang.Throwable frisbee)

  Trace a `WARNING` throwable

### error

    public void error(java.lang.String meth,
                      java.lang.String msg)

  Traces a `ERROR` level message.

### error

    public void error(java.lang.String meth,
                      java.lang.Throwable frisbee)

  Traces a `ERROR` throwable

### critical

    public void critical(java.lang.String meth,
                         java.lang.String msg)

  Traces a `CRITICAL` level message.

### critical

    public void critical(java.lang.String meth,
                         java.lang.Throwable frisbee)

  Traces a `CRITICAL` throwable

### alert

    public void alert(java.lang.String meth,
                      java.lang.String msg)

  Traces a `ALERT` level message.

### alert

    public void alert(java.lang.String meth,
                      java.lang.Throwable frisbee)

  Traces a `ALERT` throwable

### emergency

    public void emergency(java.lang.String meth,
                          java.lang.String msg)

  Traces a `EMERGENCY` level message.

### emergency

    public void emergency(java.lang.String meth,
                          java.lang.Throwable frisbee)

  Trace a `EMERGENCY` throwable

### addTracerListener

    public static void addTracerListener(TracerListener listener)

  Adds a `TracerListener`.

### removeTracerListener

    public static void removeTracerListener(TracerListener listener)

  Removes a `TracerListener`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD