Skip to Content

SAP NetWeaver 2004s, starting in SP Stack 12, includes a few unofficial, unsupported yet useful tools that might be helpful to developers of all kinds. This is the first of three articles on these tools.

Afterwards, I may write a blog on generally how to debug a portal application from within NetWeaver Developer Studio. COMMENT THIS BLOG if you want me to spend a blog or 2 on this.

Anyone, one of the new tools, Log Watch, makes it easier to read the log. Logging is a basic AS Java function. For more information check out the following topics:

Log Watch

The idea of log watch is to have an easy-to-use log viewer that displays log messages in the portal in (almost) real-time. In addition, you can choose the locations to be displayed and the severity levels to be displayed. For example, I can select a location, a severity and click Record. All log messages from that point are stored in memory. The moment I press Stop or Refresh, I can see all the new messages in that location and with the severity level I specified.

image

You can also select higher-level locations — like, com.sap.portal.navigation — and then all messages from locations under this are displayed as well.

Some Use Cases

So when would such a tool be useful?

  • Easily access log messages without working with a 10MB defaultTrace file.
  • Easily access log messages for a specific application and severity level.
  • Change the severity level for a specific logging location. This affects the messages recorded both in the Log Watch and in the defaultTrace file.
  • Easily find log messages for an unknown location, for diagnosing problems for which you do not know the logging location. Here you can specify a higher-level location.

Accessing the Component

The component is not officially released or supported, but you can access it through the PortalAnywhere.Go interface.

  • Application: com.sap.tc~ep~common~logWatch
  • Component: LogWatchView

For more information, see Debugging Tools: Log Watch, Navigation Reporter and Navigation Debugger.  

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Sandip Agarwalla
    hi Daniel,
    nice to have this tool. thanks for the info.
    i checked it in my portal, it said logwatch v0.65, though the portal is upgraded to sp12.

    also, i dint find my custom applications in the dropdown, for which i would like to see the log.

    did i miss something here?

    Regards
    Sandip

    (0) 
    1. Daniel Wroblewski Post author
      Hi Sandip,

      I was using an SP13 version for the screen shots. 0.7 will be in SP13.

      Currently, there is no simple way to change the root locations, which are System, com.sap.portal, com.sap.portals, com.sapportals, com.sap.netweaver. The root locations are defined in the portalapp.xml. You could change these and redeploy them.

      I notified development of the issue.

      Daniel

      (0) 
      1. Sandip Agarwalla
        Good to hear that. Thanks Daniel.

        Eagerly waiting for your blogs on how to debug a portal application from within NetWeaver Developer Studio as usual …

        Regards
        Sandip

        (0) 
  2. Praveen Kalla
    Very intreseting article.

    I modified log level to com.sap.portal.navigation.reporter using log watcher and then I typed http://:/irj/portal?DEBUG_MODE=X

    and I don’t see anything at the bottom of the page.

    Am I doing something wrong?

    Thanks,
    Praveen.

    (0) 

Leave a Reply