CMS-4372 Implement logging functions in javascript.