Dbug 允许 clusterj 应用程序在集群 ndbapi 库中启用 DBUG 功能。dbug 状态是一个控制字符串,由用冒号分隔的标志组成。标志是:
d 设置调试标志
a[,filename] 将调试输出附加到文件
A[,filename] 类似于 a[,filename] 但在每次操作后刷新输出
d[,keyword[,keyword...]] 启用具有指定关键字的宏的输出
D[,tenths] 每次操作后延迟指定的十分之一秒
f[,function[,function...]] 限制输出到指定的函数列表
F 用源文件的文件名标记每个输出
我用当前进程的进程 ID 标记每个输出
g[,function[,function...]] profile 指定的函数列表
L 用源文件的行号标记每个输出
n 用当前函数嵌套深度标记每个输出
N 用序号标记每个输出
o[,filename] 将调试输出覆盖到文件
O[,filename] 类似于 o[,filename] 但在每次操作后刷新输出
p[,pid[,pid...]] 将输出限制为指定的进程 ID 列表
P 用进程名称标记每个输出
r 将缩进级别重置为零
t[,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();
public interface Dbug {
// Public Methodspublic 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();
}
public abstract Dbug append(String fileName);
Specify the file name for debug output (append).
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 |
public abstract Dbug debug(String[] strings);
Set the list of debug keywords.
public abstract Dbug flush();
Force flush after each output operation.
public abstract String get();
Return the current state.
public abstract Dbug output(String fileName);
Specify the file name for debug output (overwrite).
public abstract void pop();
Pop the current state. The new state will be the previously pushed state.
public abstract void print(String keyword,
String message);
Print debug message.
public abstract void push(String state);
Push the current state and set the parameter as the new state.
public abstract void set(String state);
Set the current state from the parameter.