Method chaining
We can invoke multiple method calls by chaining logger methods.
We can chain these logger methods:
WL.Logger.ctx WL.Logger.createThis example carries out these steps:
- Sets the package context to com.my.app
- Logs Hello.
WL.Logger.ctx({pkg: 'com.my.app'}).log('Hello'); // '[com.my.app] Hello'
Parent topic: Configure the MobileFirst Logger