Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Cryptix V3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cryptix.util.core
Class Debug

    java.lang.Object
      |
      +--cryptix.util.core.Debug

public class Debug
extends Object

This class provides methods for determining where debugging output should be sent, and what level of debugging is enabled for specific classes and algorithms. Debugging levels are set in the `Cryptix.properties` file.

Copyright © 1997, 1998 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.3 $

Since:
  Cryptix 2.2.2
Author:
  David Hopwood

Field Summary
`static boolean` | `GLOBAL_DEBUG` Whether to compile the library with a standard level of debugging support.
`static boolean` | `GLOBAL_DEBUG_SLOW` Whether to compile the library with additional debugging support that is likely to slow it down.
`static boolean` | `GLOBAL_TRACE` Whether to compile the library with tracing support or not.

Method Summary
`static int` | `getLevel(String label)` Returns the debug level for label.
`static int` | `getLevel(String label1, String label2)` Returns the maximum of the debug levels for label1 and label2.
`static java.io.PrintWriter` | `getOutput()` Returns the PrintWriter to which debugging output is to be sent.
`static boolean` | `isTraceable(String label)` Return true if tracing is requested for a given class.

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

Field Detail

### GLOBAL_TRACE

    public static final boolean GLOBAL_TRACE

  Whether to compile the library with tracing support or not.

  After changing this field, all classes should be recompiled in order to make sure that the change has taken effect.

### GLOBAL_DEBUG

    public static final boolean GLOBAL_DEBUG

  Whether to compile the library with a standard level of debugging support.

  After changing this field, all classes should be recompiled in order to make sure that the change has taken effect.

### GLOBAL_DEBUG_SLOW

    public static final boolean GLOBAL_DEBUG_SLOW

  Whether to compile the library with additional debugging support that is likely to slow it down.

  After changing this field, all classes should be recompiled in order to make sure that the change has taken effect.

Method Detail

### isTraceable

    public static boolean isTraceable(String label)

  Return true if tracing is requested for a given class.

  User indicates this by setting the tracing `boolean` property for label in the `Cryptix.properties` file. The property's key is "`Trace.label`".

  Parameters:
    `label` - The name of a class.
  Returns:
    True iff a boolean true value is set for a property with the key `Trace.label`.

### getLevel

    public static int getLevel(String label)

  Returns the debug level for label. This is normally given by the numeric provider property "`Debug.Level.label`".

  If this property is not set, "`Debug.Level.*`" is searched next. If neither property is set, or if the first property found is not a valid decimal integer, then this method returns 0.

### getLevel

    public static int getLevel(String label1,
                               String label2)

  Returns the maximum of the debug levels for label1 and label2.

### getOutput

    public static java.io.PrintWriter getOutput()

  Returns the PrintWriter to which debugging output is to be sent.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Cryptix V3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) 1995-2000 The Cryptix Foundation Ltd. All rights reserved.