cancel
Showing results for 
Search instead for 
Did you mean: 

A dumb question about logging

Former Member
0 Kudos

Hi all,

i ran into some problems using the pregenerated static Location "logger" instance of an arbitrary WD controller for logging.

So far i used this logger in conjunction with a superior Category instance only, e.g. the logging (and tracing, if minimum severity is configurated at a proper level) output was related to a category like "/Application/MaterialManagement" or whatever.

Now i tried to use the logger without a category after a long time again, but i didn't succeed to generate any output!?!

So my question is: What do i have to do (configurate) to produce some output from this Location? I remember, that in earlier versions there has been a (file-based) WDRx.log, which kept all WD-related output of the configurated severity level. Do i have to reactivate this somehow?

Thanks in advance.

Regards

Stefan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hmmm,

i found it by myself. I looked into the wrong trace (dispatcher's default trace instead of server's default trace, aehem).

For all of you who want to know where the logging output goes by default:

If you use the

  private static final com.sap.tc.logging.Location logger = 
    com.sap.tc.logging.Location.getLocation(Your.class);

generated by the WD generation framework for example like

  public void wdDoInit()
  {
    final String _methodName = "wdDoInit()";
    try {
      logger.entering(_methodName);
      logger.infoT("Time to do something useful.");
    } finally {
      logger.exiting();
    }    
  }

the complete output of the logger will be output to the trace which is displayable in the "Log Viewer" service of the Visual Admin at "Cluster (xx)->Server xx->.\log->10:defaultTrace.trc"

Since there's an identical entry under the "Dispatcher xx" node (should have number 32), take care not to view the wrong one

Regards

Stefan