2

We need to create a custom log file (Example: payment.log) that contains only a custom log for payment module. We have already configured the server (server.xml) with below:

<logging consoleLogLevel="off" 
         copySystemStreams="false" 
         maxFiles="10"
         traceFileName="payment.log" 
         traceFormat="BASIC" 
         traceSpecification="com.dm.epay.logging.*=debug=enabled:com.worklight.*=off" 
         suppressSensitiveTrace="true"/>

Then, In the adapter (Example PaymentAdapter), we have called a custom java (DmEpayLogger) class: com.dm.epay.logging.DmEpayLogger.info("INFO >> Init Payment"); to write the log in "payment.log" file.

The problem is that payment.log file is mixed with other worklight logs. So, we believe that we have missed something in server.xml config file.

Any idea? Please advise!

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
Dali Grissa
  • 51
  • 1
  • 2
  • 10
  • Maybe this answer will help: http://stackoverflow.com/questions/36041659/worklight-send-application-logs-to-specific-log-file/36041803#36041803 . I don't think you can write a specific adapter log to specific file. – Sami Mar 17 '16 at 18:30
  • what sort of trace statements do you see in your logs from Worklight? Any idea what level of worklight logs is coming through? (info, finest, audit, etc) – Andy Guibert Mar 17 '16 at 18:46
  • SystemOut (O com.worklight.analytics.api.AnalyticsHttpService.sendDataToURL target server response code: 201...) com.ibm.ws.webcontainer.servlet... t.integration.js.JavaScriptIntegrationLibraryImplementation... – Dali Grissa Mar 18 '16 at 13:52

1 Answers1

0

What you've basically done in your server.xml setup is to replace the default messages.log file with a payments.xml file, but this only replaces the the file the logging will go to, that is all.

The ability to specify a log file to write to from adapters is not an available/built-in feature provided by IBM MobileFirst Platform.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89