|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--coins.driver.Trace
Trace controller.
A trace controller is initialized by trace options specified in a command
line and determines which trace message should be printed.
There are two types of trace messages: generic (category-free) trace
messages and categorized trace messages. A trace message may have a
message level which is an integer value. Trace messages without message
levels are called level-less trace messages and treated as level-zero.
A trace option is one of COINS options and should be given in the form:
-coins:trace=tracespec/tracespec /...where tracespecs can be level or category.level. When level is specified, generic trace messages whose level is below the level are shown. When category.level is specified, trace messages of category category whose level is below the level are shown. When more than one levels are specified, or more than one category.levels are specified for a same category, the latter one overwrites the formar one. A special category "default" is provided to specify a trace level of all trace categories (and category-less messages) except categories appeared in other tracespecs.
コンストラクタの概要 | |
Trace(java.io.PrintStream out,
java.lang.String traceArgument,
Warning warning)
Constructs a new trace controller, which prints trace messages specified to be printed by command line options. |
|
Trace(java.io.PrintStream out,
Warning warning)
Constructs a new default trace controller, which prints no trace messages to a specified PrintStream. |
|
Trace(Warning warning)
Constructs a new default trace controller, which prints no trace messages to System.out. |
メソッドの概要 | |
int |
getDefaultTraceLevel()
Returns the default category trace level, which is used to determine whether a trace message whose category is not appeared in trace specifications should be printed or not. |
int |
getGenericTraceLevel()
Returns the generic trace level, which is used to determine whether a generic (category free) trace message should be printed or not. |
int |
getTraceLevel(java.lang.String category)
Return a category-wise trace level of a category. |
int |
setDefaultTraceLevel(int newLevel)
Redefines the default trace level. |
int |
setGenericTraceLevel(int newLevel)
Redefines the generic trace level. |
int |
setTraceLevel(java.lang.String category,
int newLevel)
Redefines a category-wise trace level. |
boolean |
shouldTrace()
Tests if a generic level-less trace message should be printed or not. |
boolean |
shouldTrace(int level)
Tests if a generic trace message of a certain level should be printed or not. |
boolean |
shouldTrace(java.lang.String category)
Tests if a level-less trace message of a certain category should be printed or not. |
boolean |
shouldTrace(java.lang.String category,
int level)
Tests if a trace message of a certain category and level should be printed or not. |
void |
trace(int level,
java.lang.String message)
Prints a generic message of a certain message level when it should be printed. |
void |
trace(java.lang.String message)
Prints a generic level-less trace message when it should be printed. |
void |
trace(java.lang.String category,
int level,
java.lang.String message)
Prints a message of a certain message category and level when it should be printed. |
void |
trace(java.lang.String category,
java.lang.String message)
Prints a level-less message of a certain message category when it should be printed. |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
public Trace(Warning warning)
warning
- warnings should go here.public Trace(java.io.PrintStream out, Warning warning)
out
- the trace output PrintStream.warning
- warnings should go here.public Trace(java.io.PrintStream out, java.lang.String traceArgument, Warning warning)
out
- the trace output PrintStream.traceArgument
- argument of the trace option.warning
- warnings should go here.メソッドの詳細 |
public boolean shouldTrace()
public boolean shouldTrace(int level)
level
- the message levelpublic boolean shouldTrace(java.lang.String category)
public boolean shouldTrace(java.lang.String category, int level)
public void trace(java.lang.String message)
message
- the message.public void trace(int level, java.lang.String message)
level
- the message level.message
- the message.public void trace(java.lang.String category, java.lang.String message)
message
- the message.public void trace(java.lang.String category, int level, java.lang.String message)
level
- the message levelmessage
- the messagepublic int getGenericTraceLevel()
public int getDefaultTraceLevel()
public int getTraceLevel(java.lang.String category)
category
- the category.
public int setGenericTraceLevel(int newLevel)
newLevel
- a new value of the generic trace level.
public int setDefaultTraceLevel(int newLevel)
newLevel
- a new value of the default trace level.
public int setTraceLevel(java.lang.String category, int newLevel)
category
- a message category.newLevel
- a new value of the category-wise trace level.
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |