Javascript Client Library Logger compatible with Log4j

My issue votes
0
votes
0/20 total votes used
Project:Kaltura Community Edition (CE) - Self Hosted Online Video Platform
Version:api_v3
Component:Code
Category:feature request
Priority:normal
Assigned:aurium
Status:patch (code needs review)
Total votes:0
Description

The KalturaClientBase.js has the IKalturaLogger prototype, but that is too simple and incompatible with the commom logging standard log4j (translated to some other languages). So i made some changes to make it compatible with log4javascript.js and allowed the user to use this nice tool.

Please get my changes attached here. The usage of the log4javascript.js is really good for developing and monitoring.

Usage example:

<script type="text/javascript" src="js/log4javascript.js"></script>
<script type="text/javascript" src="js/kaltura.js"></script>
<script type="text/javascript">
  var log = log4javascript.getDefaultLogger();
  var kConfig = new KalturaConfiguration(parseInt(partnerid));
  kConfig.setLogger(log);
  log.info('Starting the client', {partnerid:partnerid, date:(new Date())});
</script>

That will open a filterable logging window.

AttachmentSize
KalturaClientBase_js_diff.txt3.42 KB