cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Logs & Traces: How to see the result of SimpleLogger.traceThrowable()

MikeB
Contributor
0 Kudos

In my application I use SimpleLogger to write logs:

  1. SimpleLogger.log(int severity, Category category, Location location, String message, String messageID) — for non exceptions cases
  2. SimpleLogger.traceThrowable(int severity, Location location, String message, String messageID, Throwable exc) — for cases with exceptions

The first function works correctly, while SimpleLogger.traceThrowable() doesn't seem to be writing any log at all, at least I can't find any log with the exceptions, written by traceThrowable() on https://HOSTNAME:PORT/nwa/logs.

I checked https://help.sap.com/saphelp_nw73/helpdata/en/48/470b83c7d0350ce10000000a42189d/frameset.htm and I can't spot any issue in my code.

Code snippet:

//works
SimpleLogger.log(logSevLvl, logCat, logLoc, logMsgID, logMsg); //doesn't work
SimpleLogger.traceThrowable(logSevLvl, logLoc, logMsgID, logMsg, logExp);

Do you have any idea why I can't see any log, written by traceThrowable() in nwa/logs?

ErvinSzolke
Product and Topic Expert
Product and Topic Expert

Dear Mike,

please note that I have changed the tags by removing Webservices Java and NWDI as I don't see the relation to that topic, and I moved NWA to the primary tags.

Regards,
Ervin (moderator)

MikeB
Contributor
0 Kudos

Dear Ervin,

thanks for keeping me updated.
My project is developed in NWDS, and I assumed that the logging and tracing subject is tightly coupled with the infrastructure domain, since it serves the needs of maintainer to keep the core business process running, but barely has to do with the business process itself.

Accepted Solutions (1)

Accepted Solutions (1)

former_member108703
Participant

Hello Mike,

What log severity did You use? The issue may be that no logs generated on the set severity level or above. Try to change the severity to log more detailed information.

Zoltan

former_member108703
Participant
0 Kudos

Addition:
You can set the trace severity in Configtool or in NWA or Visual Administrator depending on your NetWeaver JAVA version:

1771192 - (How-to) Log / Trace configuration for JAVA 7.1+ systems

1770670 - (How-to) Log / Trace configuration for JAVA 7.0

Zoltan

MikeB
Contributor
0 Kudos

Hi Zoltan,

thanks for the links, but it seems to be links to the corporate intranet — *.sap.corp.

Can you, please, provide a public link for the documentation?

Thanks.

former_member108703
Participant
0 Kudos

Hello Mike,

Sorry, check these links:

https://launchpad.support.sap.com/#/notes/1771192

https://launchpad.support.sap.com/#/notes/1770670

You can also also open them from SAP Launchpad by their number.

Anyways, You can change the log configurations here depending on your version:

  1. Config tool: template ->log configuration ->categories/locations
  2. NetWeaver Administrator: ToubleShooting > Logs and Traces > Log Configuration
  3. Visual Administrator: ServerN ->Kerne ->LogManager

Zoltan

MikeB
Contributor
0 Kudos

To your initial question, I'm using Severity.ERROR to call the SimpleLogger.traceThrowable(). This severity level is enough to write the data with SimpleLogger.log().

I tried to use the most detailed severity level, based on a documentation, — Severity.DEBUG, but it still doesn't work.

Code snippet:

SimpleLogger.traceThrowable(Severity.DEBUG,
Location.getLocation(MyClass.class.getName()), "NotificationText", "TEST TRACE", new Exception());

Answers (0)