Documentation Home
MySQL Cluster API Developer Guide
Download this Manual
PDF (US Ltr) - 4.8Mb
PDF (A4) - 4.8Mb
EPUB - 1.9Mb
HTML Download (TGZ) - 1.8Mb
HTML Download (Zip) - 1.9Mb


4.3.1.12 Dbug

Dbug allows clusterj applications to enable the DBUG functionality in cluster ndbapi library. The dbug state is a control string that consists of flags separated by colons. Flags are:

  • d set the debug flag

  • a[,filename] append debug output to the file

  • A[,filename] like a[,filename] but flush the output after each operation

  • d[,keyword[,keyword...]] enable output from macros with specified keywords

  • D[,tenths] delay for specified tenths of a second after each operation

  • f[,function[,function...]] limit output to the specified list of functions

  • F mark each output with the file name of the source file

  • i mark each output with the process id of the current process

  • g[,function[,function...]] profile specified list of functions

  • L mark each output with the line number of the source file

  • n mark each output with the current function nesting depth

  • N mark each output with a sequential number

  • o[,filename] overwrite debug output to the file

  • O[,filename] like o[,filename] but flush the output after each operation

  • p[,pid[,pid...]] limit output to specified list of process ids

  • P mark each output with the process name

  • r reset the indentation level to zero

  • t[,depth] limit function nesting to the specified depth

  • T mark each output with the current timestamp

For example, the control string to trace calls and output debug information only for "jointx" and overwrite the contents of file "/tmp/dbug/jointx", use "t:d,jointx:o,/tmp/dbug/jointx". The above can be written as ClusterJHelper.newDbug().trace().debug("jointx").output("/tmp/dbug/jointx").set();

4.3.1.12.1 Synopsis
 public interface Dbug {
// Public Methods public abstract Dbug append(String fileName);
public abstract Dbug debug(String string);
public abstract Dbug debug(String[] strings);
public abstract Dbug flush();
public abstract String get();
public abstract Dbug output(String fileName);
public abstract void pop();
public abstract void print(String keyword,
String message);

public abstract void push();
public abstract void push(String state);
public abstract void set();
public abstract void set(String state);
public abstract Dbug trace();
}

Figure 4.11 Dbug Class

Dbug Class

4.3.1.12.2 append(String)
public abstract Dbug append(String fileName);

Specify the file name for debug output (append).

Parameters

fileName

the name of the file

return

this

4.3.1.12.3 debug(String)
public abstract Dbug debug(String string);

Set the list of debug keywords.

Parameters

string

the comma separated debug keywords

return

this

4.3.1.12.4 debug(String[])
public abstract Dbug debug(String[] strings);

Set the list of debug keywords.

Parameters

strings

the debug keywords

return

this

4.3.1.12.5 flush()
public abstract Dbug flush();

Force flush after each output operation.

Parameters

return

this

4.3.1.12.6 get()
public abstract String get();

Return the current state.

Parameters

return

the current state

4.3.1.12.7 output(String)
public abstract Dbug output(String fileName);

Specify the file name for debug output (overwrite).

Parameters

fileName

the name of the file

return

this

4.3.1.12.8 pop()
public abstract void pop();

Pop the current state. The new state will be the previously pushed state.

4.3.1.12.9 print(String, String)
public abstract void print(String keyword,
String message);

Print debug message.

4.3.1.12.10 push()
public abstract void push();

Push the current state as defined by the methods.

4.3.1.12.11 push(String)
public abstract void push(String state);

Push the current state and set the parameter as the new state.

Parameters

state

the new state

4.3.1.12.12 set()
public abstract void set();

Set the current state as defined by the methods.

4.3.1.12.13 set(String)
public abstract void set(String state);

Set the current state from the parameter.

Parameters

state

the new state

4.3.1.12.14 trace()
public abstract Dbug trace();

Set the trace flag.

Parameters

return

this


User Comments
Sign Up Login You must be logged in to post a comment.