on 10-28-2004 10:40 AM
I am trying to use the logger but it seems that unless i create a location named: "myview.class", i will not be able to see it? is this correct.
This code is generated automatically:
<b>private static final com.sap.tc.logging.Location logger =
com.sap.tc.logging.Location.getLocation(myView.class);</b>
And i can not change it, so if i dont have the location i can not use it.
<b>logger.errorT("myMessage"); - this will not be seen.</b>
The only way i could see my log messages was if i did this:
com.sap.tc.logging.Location.getLocation("ExistingOldLocation").errorT("mymessage");
Hi Erez,
You have to create a location like this. E.g. I have class
com.dbeisert.Hello that has logger.
public class Hello{
private static final com.sap.tc.logging.Location logger =
com.sap.tc.logging.Location.getLocation(Hello.class);
}
If you create a location with the name of "com.dbeisert"
everything in this package and each subpackage will be logged to this location. So just create location with the package prefix of your application and logging will work for each class under this package. It is basically like Log4J.
rgds
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.