package com.sap.fooPackage;
import com.sap.tc.logging.*;
public class Node { private static final Location loc = Location.getLocation("com.sap.fooPackage.Node"); private static final Category cat = Category.getCategory("/System/Database"); public void store() { try { // Write object data to database ... } catch (FailedRegistrationException e) { cat.errorT(loc, "store()", "Error storing node {0} in database.", new Object[] {this}); } } // method store } // class Node |
The output is identical to the Example of Working on a Location Object, assuming the default setting is used (with ConsoleLog and default TraceFormatter). You will only get a different result when you configure the output display accordingly. For example, when using another formatter, or change the pattern of the TraceFormatter.
For more information, see Basic Features.