1
votes

I would like to log the Worklight server log in adapters. I have turned "audit" = true in adapter XML and used WL.Logger.log("Here is my log") to test the logging.

In WebSphere\AppServer\profiles\AppSrv01\logs\server1\SystemOut.log, I can see the following log:

[2013/8/3   21:36:28:581 CST] 000000bb JavaScriptInt I   com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation log Here is my log
[2013/8/3   21:36:31:225 CST] 0000006b AuditBean     I  audit User 'Unknown' invoked procedure 'Adapter.getData' with parameters {
   "arr": [
   ]
}

My question is that:

(1) Can I create a log file which only logs these Worklight server log? Is there any log4j.properties in Worklight which I can set this info? I have searched around the information center and it tells me to reference to Websphere application server logging. But I believe I shall configure this in Worklight?

(2) Can Worklight server HTTP session can be logged as well?

Many thanks.

Environment: Worklight 5.0.6.1, WAS ND 8.5

1

1 Answers

0
votes
  1. Starting Worklight 5.0.5, Worklight no longer uses Log4j, rather JUL (Java Util Logging) is used. This means that you have to do it in the tools of the application server that you use.

    I've found the following: Adding custom handlers, filters, and formatters.
    Perhaps what you can do in WAS is to add the above and filter com.worklight.

  2. I do not fully understand this, can you elaborate? Until then,
    Try to use a 3rd party application such as Wireshark.