Hi Maduranga, I'm not sure whether we can have a 1 to 1 mapping between Apache commons logging and all the methods available for console object or not. But wouldn't it be confusing for the user to support a limited set of methods? IMHO, We should at least state somewhere in the ui about the supported and non-supported methods in conditional authentication context.
For instance, some dev might find console.info() [1] as their most used logging method and will lead to bad scripting experience. What are your thoughts on this? [1] https://developer.mozilla.org/en-US/docs/Web/API/Console/info Regards, On Wed, Jan 17, 2018 at 11:34 AM, Maduranga Siriwardena <[email protected]> wrote: > Hi Devs, > > To support logging in the JavaScript used for conditional authentication > (mail thread [1] @ architecture@) we are trying to mimic the > "console.log()" in the JavaScripts. > > To achieve this, we have added a binding for a apache commons log object > with key name "console" to nashorn engine. So this support logging with > below syntax withing the JavaScript. > > console.log("some test") > console.debug("some test") > console.error("some test") > > Above logs will be working as usual when used in Java classes (printed in > wso2carbon.log file and backend console). > > Any suggestions? > > [1] [Architecture] Conditional Authentication Support on WSO2 Identity > Server > > Thanks, > -- > Maduranga Siriwardena > Senior Software Engineer > WSO2 Inc; http://wso2.com/ > > Email: [email protected] > Mobile: +94718990591 <+94%2071%20899%200591> > Blog: *https://madurangasiriwardena.wordpress.com/ > <https://madurangasiriwardena.wordpress.com/>* > <http://wso2.com/signature> > -- Thusitha Kalugamage *Software Engineer* Mobile : +94 (0) 774 074370 Tel : +94 (0) 112 145 345 [email protected]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
