Logging in Web Dynpro (Java) – a guide and tutorial for beginners [Part 2]
In the Logging in Web Dynpro (Java) – a guide and tutorial for beginners [Part 1] of this guide we were using a Log and File viewer servlet. It has limited functionality, but satisfies our needs – it is simple, fast and have basic search. In case when more advanced activity with logs have to be done , more advanced tool is needed. In this part of my guide we’ll look at Logs and Traces view in Netweaver Administrator.
You can access to Netweaver Administrator (NWA) via url (remeber to put your netweavers’s host and port):
Type your username and password and you should see a main screen of NWA. On the top bar main topics of maintanance are located. In the second bar more detailed areas are displayed when you change main topic.
Click on the Monitoring (on the bar or in the Overview area). Now you should see a view with a specific tasks. Choose Logs and Traces.
This will show us Logs and Traces view:
On the left dropdown you can choose what kind of view you want to see. Predefinded View contains a set of ready to use views which you can choose from second dropdown. Selecting Custom View you will be able to create a new view from scratch. Let’s stay with Predefinded View. In part 1 I’ve told that Location objects which are default inserted in Web Dynpro classes are assigned to files defaultTrace.0.trc, defaultTrace.1.trc etc. These objects emit messages formatted by a ListFormatter, which is not very comfortable for reading by humans, but it can be useful for other applications – all data are hash-separated. In plain file it looks like this:
#0#0#Info##Plain###This is info message#
Now we can see how it looks processed by NWA. Select Default Trace from second dropdown. Propably you’ll see some messages from your Netweaver server and, as you see, they are displayed well in a table.
Messages formatted by ListFormatter are well prepared for processing and NWA do this. You can choose wich columns should be displayed (Open column customization button) or search a specific content via filters – just hit Open Filter button and choose what you need, mainly from Filter By Content section.
Ok, now we want to see our last created trace file from Part 1 of my guide (common.trc). Select Expert from the second dropdown. Two additional dropdowns will be displayed: Display Log File and From. Just find common.trc in the first and you will see its content.
In part 3 we will take a look to log configurations.