Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference VERSION B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.adf.model.adapter.utils
Class DebugLog

`java.lang.Object
oracle.adf.model.adapter.utils.DebugLog`

public class DebugLog
extends java.lang.Object

A `DebugLog` object can be used to log debug messages.

A class that wants to use this class should create an instant by passing its name.

Following is an example of typical use of this class.

     public class MyClass
     {
       // Creating the logger Debug logger
       private DebugLog mDbgLog = new DebugLog(this);

       ...

       public void myMethod()
       {
         mDbgLog.startMethod("myMethod");
         mDbgLog.log("Start.");

         try
         {
           ...
           mDbgLog.log("This is a debug log message.");
           ...
         }
         finally
         {
           mDbgLog.endMethod();
         }
       }

     }

Field Summary
`static boolean` | `forceLog` Sets to force the logging to appear on the System.out.

Constructor Summary
`DebugLog(java.lang.Object obj)` Creates a `DebugLog` object for a class.
`DebugLog(java.lang.String name)` Creates a `DebugLog` object for a class.

Method Summary
`void` | `endMethod()` Ends the current method.
`void` | `log(java.lang.Object msg)` Logs a message.
`void` | `log(java.lang.String msg1, java.lang.String msg2)` Logs a message.
`void` | `startMethod(java.lang.String methodName)` Sets the current method name.

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

Field Detail

### forceLog

    public static boolean forceLog

  Sets to force the logging to appear on the System.out. Used only for the development time test purpose.

Constructor Detail

### DebugLog

    public DebugLog(java.lang.Object obj)

  Creates a `DebugLog` object for a class.
Parameters:
  `obj` - Object for the class that uses this logger.

### DebugLog

    public DebugLog(java.lang.String name)

  Creates a `DebugLog` object for a class.
Parameters:
  `name` - Name of the class that uses this logger.

Method Detail

### startMethod

    public void startMethod(java.lang.String methodName)

  Sets the current method name.
  Parameters:
    `methodName` - Name of the method that is using the logger currently.

### endMethod

    public void endMethod()

  Ends the current method.

### log

    public void log(java.lang.Object msg)

  Logs a message.
  Parameters:
    `msg` - Message to log.

### log

    public void log(java.lang.String msg1,
                    java.lang.String msg2)

  Logs a message.
  Parameters:
    `msg1` - Message to log.
    `msg2` - Message to log.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference VERSION B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1997, 2005, Oracle. All rights reserved.