cancel
Showing results for 
Search instead for 
Did you mean: 

Creating dedicated logging view in NWA for 3 custom applications

Amey-Mogare
Contributor
0 Kudos

Hello All,

I have a requirement where I need to log messages from 3 custom applications (2 Portal DCs & 1 WD Java DC) into a dedicated logger view in NWA.

This messages should not be part of default traces/SAP logs.

Portal version is 7.4 SP9.

Exact words from requirement are as follows: -

The log entries should be visible under a separate section / view in NWA log viewer, it should not be logged in default traces or SAP logs.

The following information should be visible in the SAP Account Mapping log:

• Severity

• date

• time

• Message

• User

I am currently using below approach to log my messages in apps: -

private static final Location loc = Location.getLocation(MyClass.class);

private static final Category cat = Category.getCategory(Category.APPS_COMMON, MyClass.class.getName());

SimpleLogger.log(Severity.DEBUG, cat, loc, "DEBUG", "[static block] Inside static block of MyClass");

But I don't know how to log messages in separate view in NWA.

Please help.

Thanks & Regards,

Amey

Accepted Solutions (1)

Accepted Solutions (1)

roman_loshevsky
Active Participant
0 Kudos

Hi,

You can creat custom view - https://help.sap.com/saphelp_nw73ehp1/helpdata/en/47/acedd655150986e10000000a42189c/content.htm

If the logging information should not be in defaulTrace files you will need to write it in to custom log file.

When you want to see custom logs in NWA Log Viewer - just use option to apload external file in Log Viewer
Log Files -> Open External File

regards,
Roman.

Amey-Mogare
Contributor
0 Kudos

Hello Roman,

Thanks for reply.

I have understood how to create new view in NWA Log Viewer.

However, your below line is not clear to me -->

If the logging information should not be in defaulTrace files you will need to write it in to custom log file.


1. How do I ensure my logs are getting written in separate file?


All I use are below statements:


SimpleLogger.log(Severity.DEBUG, cat, loc, "DEBUG", "[static block] Inside static block of MyClass");



2. I want this view to be visible in NWA of all users. How do I ensure this?



Thanks & Regards,

Amey

roman_loshevsky
Active Participant
0 Kudos

Hi Amey,

If your requirements that messages should not be part of default traces/SAP logs you need own log file.

See - How to create own log files on a SAP NetWeaver AS Java 7.3 and higher - CRM - SCN Wiki

If the view should be visible for all users you need to grant permissions.

Are you sure that you want to provide permissions to all users for usage of NWA ?

Regards,
Roman.

Amey-Mogare
Contributor
0 Kudos

Hello Roman,

Thanks for reply. I will try this.

Reg "Are you sure that you want to provide permissions to all users for usage of NWA ?"   No.  What I really meant is that it should be accessible to a group of user (admin users)   Not to 'all' users.

Thanks & Regards,

Amey

roman_loshevsky
Active Participant
0 Kudos

Hello Amey,
So you need to assign Administrator UME role to the group of admin users and it will grant permissions to use required log view.
Regards,
Roman.

Amey-Mogare
Contributor
0 Kudos

Hello Roman,

I applied changes in configTool to create new destination, formatter etc and also appended my package names in "SingleTraceFile_UnrestrictedLocations" property and restarted cluster.

How to create own log files on a SAP NetWeaver AS Java 7.3 and higher - CRM - SCN Wiki

Now, I am not able to verify/test step#2 mentioned in above article in section "Setting location configuration severity via SAP NetWeaver Administrator".

I dont see my custom destination appearing there.

Could you please suggest why this is happening?

Portal : 7.4 SP9

Thanks & Regards,

Amey

Answers (0)