Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

4.3.1.13 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.13.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();
}
4.3.1.13.2 append(String)
public abstract Dbug append(String fileName);

Specify the file name for debug output (append).

Table 4.26 append(String)

Parameter Description
fileName the name of the file
return this

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

Set the list of debug keywords.

Table 4.27 debug(String)

Parameter Description
string the comma separated debug keywords
return this

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

Set the list of debug keywords.

Table 4.28 debug(String[])

Parameter Description
strings the debug keywords
return this

4.3.1.13.5 flush()
public abstract Dbug flush();

Force flush after each output operation.

Table 4.29 flush()

Parameter Description
return this

4.3.1.13.6 get()
public abstract String get();

Return the current state.

Table 4.30 get()

Parameter Description
return the current state

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

Specify the file name for debug output (overwrite).

Table 4.31 output(String)

Parameter Description
fileName the name of the file
return this

4.3.1.13.8 pop()
public abstract void pop();

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

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

Print debug message.

4.3.1.13.10 push()
public abstract void push();

Push the current state as defined by the methods.

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

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

Table 4.32 push(String)

Parameter Description
state the new state

4.3.1.13.12 set()
public abstract void set();

Set the current state as defined by the methods.

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

Set the current state from the parameter.

Table 4.33 set(String)

Parameter Description
state the new state

4.3.1.13.14 trace()
public abstract Dbug trace();

Set the trace flag.

Table 4.34 trace()

Parameter Description
return this


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.