IBM Worklight 6.1 write client side logs to messages.log

113 views Asked by At

In our application we managed to write client-side logs to server by using WL.Client.logActivity. Is there a way to write these logs to messages.log file of the server and not to wlreport database? i've read some related posts like this but we dont want to have a custom log file submited by the user.

So can we send somehow client-side logs back to server's messages.log?

1

There are 1 answers

0
Orlando Rincón On

Just launching an idea: Why don't you create an adapter that exposes a method "log", then when you want to log something from the client in the server side, you may do:

WL.Client.invokeProcedure( { adapter : 'adapter-name', procedure : 'log', parameters : ['your_message'] } );

And, on the adapter's log implementation, you could use WL.Logger.x API to write to the internal log files (I'm 100% sure, but I think that will write to messages.log)