on 03-12-2004 10:53 AM
I try to get me going with logging and tracing in
Sneak Preview II.
I face some difficulties with using <i>entering(...)</i> and <i>exiting(...):
public static void main(String[] args)
{
String _method = "main";
LogRecord lr = loc.entering(_method);
loc.assertion(lr.getGroup() != null, "Group == null");
loc.groupT("displayed ???????????");
loc.exiting();
}</i>
It seems that <i>entering()</i> does not create a group:
- The assertion fails, the group is null.
- There is now output for <i>groupT()</i>
- exiting does not use the subloc in its output
According to the API doc and the tutorial, I would
expect this to work in that manner.
Regards
Andreas
Hi, Andreas,
probably you are not interested anymore but: this is because grouping is turned off by default (is caused memory leaks if not used correctly, for example, you should put loc.exiting() into a finally-clause). You can turn it on by calling loc.setAutoGroupingOn(true).
Cheers
Heiko
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.