Mixin: XhrLogger

XhrLogger

A mixin class containing functionality for XHR requests logging. Consumed by the main RC.Logger class. All config options on this mixin can be configured when you create your Logger instance.

Example

 var logger = window.RC && new RC.Logger({
    enableAjaxPlayback : true
 });

Members

staticXhrLogger.enableAjaxPlaybackBoolean

Set this option to true to log all Xhr interaction for further replay later at issue debugging time. This will also set logAjaxRequests:true and logAjaxResponses:true (currently only supported for XMLHttpRequest)

Default Value:
  • false

staticXhrLogger.logAjaxRequestsBoolean

Set this option to true to log all XHR requests and add them to the exception report (currently only supported for XMLHttpRequest)

Default Value:
  • false

staticXhrLogger.logAjaxResponsesBoolean

Set this option to true to log all XHR responses and add them to the exception report (currently only supported for XMLHttpRequest)

Default Value:
  • false

staticXhrLogger.treatFailedAjaxAsErrorBoolean

Set this option to true to treat ajax failures (404, 500 etc) as an unhandled exceptions and report them.

Default Value:
  • false

Methods

staticXhrLogger.start()

Overriden to add XHR calls interceptors if needed

staticXhrLogger.stop()

Overriden to remove XHR calls interceptors if needed