cancel
Showing results for 
Search instead for 
Did you mean: 

How to automatically redirect the cds logs to SAP NetWeaver log in ORG MODELLER.

Former Member
0 Kudos

Hi Experts,

We have encountered one issue with CDS.LOG file where in log file is not automatically rolled off.

We manually do the roll log for this file via admin console after every 2 GB of file size.

We raised an OSS message for the same. We were suggested to redirect the cds logs to SAP netweaver logs in ORG MODELLER.

Following is the suggession which we received:

Navigate to following Path - [application directory]/.system/application/log and open provider.properties file.

    • Uncomment the following line :

      1. com.nakisa.log.provider=com.nakisa.framework.utility.log.SAPLogprovider
      2. sap.logger.location=com.nakisa.application
      3. sap.logger.category=Nakisa

    • Comment the following lines:

      1. Com.nakisa.log.provider=com.nakisa.framework.utility.log.log4jlogprovider

On doing so we did not get the logs redirected to NAKISA Net weaver from CDS instead we were able to see the logs in CDS.log file itself.

Further we found that provider.properties file is present in 3 different locations on server we made the above changes in file provider.properties in all the 3 different locations.

After performing these changes IDOC listener was turned off.

Please suggest an appropriate approach so as to automatically roll log the cds.log file or redirect the logs onto Nakisa net weaver.

Thanks and regards,

Rakesh Chilveri

Accepted Solutions (1)

Accepted Solutions (1)

StephenMillard
Active Contributor
0 Kudos

Rakesh.

Try setting the following files in the [application directory]/.system/application/log directory and the  [application directory]/.system/application/WEB-INF/lib/log/ (forgive any case inaccuracies in the file path).

FILE: provider.properties


com.nakisa.log.provider=com.nakisa.framework.utility.log.Log4JLogProvider

! To support SAP Logging:

! com.nakisa.log.provider=com.nakisa.framework.utility.log.SAPLogProvider

! sap.logger.location=com.nakisa.application

! sap.logger.category=Nakisa

i.e. you're just undoing the change you were given.


FILE: log.properties


log4j.rootLogger=INFO, A1

log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender

log4j.appender.A1.File={home}/Log/cds.log

log4j.appender.A1.DatePattern='.'yyyy-MM-dd

log4j.appender.A1.layout=org.apache.log4j.PatternLayout

log4j.appender.A1.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %-5p %c %x - %m%n

Once changed, restart NetWeaver to force the changes to be picked up by the logger.

This should thenset the logging to roll daily for both user/AdminConsole use and the automated extract job use.

I'm sure it goes without saying, but I'll say it anyway ... please backup these files before making any changes so that you can return to your original position just in case this doesn't work.

I would also suggest giving some consideration to adding the log.properties file to your OrgModeler build .delta so that if you have an update and load in the build, the reverted log.properties file will be updated when you publish the build (and picked up at next restart).

Regards,

Stephen.

Former Member
0 Kudos

Hi Millard,

Thanks for your reply.

We have checked in our server level files and found that we have both the above mentioned files present at the following 3 locations only:

  • \root\.system\application\Log
  • \root\WEB-INF\lib\Log
  • \root\Log

Request you to confirm the above changes are to be made in which all locations.

Please note - We found both the files together at these locations only with below settings.

Thanks and regards,

Rakesh Chilveri

StephenMillard
Active Contributor
0 Kudos

Rakesh.

Please simply follow the previous set of instructions to see if they work for you.

i.e. set the content of the files in the two locations specified in the earlier post.

Regards,

Stephen.

Former Member
0 Kudos


Hi Stephen,

As per your advice we were told to make changes to both the files at two locations mentioned below.

location 1 - [application directory]/.system/application/log/

location 2 - [application directory]/.system/application/WEB-INF/lib/log/

On checking the locations we could not find the location 2.

Hence, we made the changes to both the files in location 1 mentioned above but we were unable to get automatic roll log for CDS.log file on daily basis.

On checking further we found both these files are present in three different locations which are as follows :

  • \root\.system\application\Log
  • \root\WEB-INF\lib\Log  ..............NOTE - This is different path as compared to location 2 above.
  • \root\Log

We request you to let us know what should be the way forward for us.

Best Regards,

Rakesh Chilveri.

StephenMillard
Active Contributor
0 Kudos

Hi Rakesh.

Sincerest apologies, that was indeed a mistake on my part.  In my copy and paste (will I ever learn?) of your original path (first post) I should have removed the .system and application directory references.  The directories are in fact both based off the root.  They should be where you see your cds.log files appearing.

  • [application root directory]/Log 
  • [application root directory]/WEB-INF/lib/Log/

The .system/application one should be left alone.  But if it works I would suggest incorporating the updated files into your configuration build directory structure to ensure they don't get inadvertently overwritten.

Hope that clarifies and apologies once again for the error.

Regards,

Stephen.

Former Member
0 Kudos

Hi Stephen,

As per your advice above we made the changes to both the files in both the location but, cds.log file was not automatically generated for us.

Request you to let us know incase we have any alternate option to auto roll of CDS log file .

Best Reagrds,

Rakesh Chilveri

StephenMillard
Active Contributor
0 Kudos

Hi Rakesh.

By "cds.log file was not automatically generated for us" are you saying that the log entries were written to an existing log file?  If that's the case did you restart NetWeaver?

I guess there's a chance a file handle could still be linked back to it so you could also try a post-restart log roll and then see if a new log is generated the following day.

I've had success with this set of amendments and beyond piping the log to SAP logging (as presented in the commented out lines in the log configuration files; which I've never actually opted to do), I'm afraid I don't have any alternate suggestions at this time.  These files are THE way to control what happens to your log so amending them should have some effect ... but it sounds like you aren't seeing any effect at all.

If the above additional suggestions do not work and no one else can offer up any further suggestions I would suggest you raise the issue via OSS.

Regards,

Stephen.

Answers (0)