Gemalto Ezio Web Connector

 

Tracking

Get details about each operations performed by EWC

To activate the traces coming from EWC, you have to include a new JavaScript library named "logging.js" in your HTML page.

<script src="sconnect_uc.js"></script>
<script src="pcsc_uc.js"></script>

<script src="logging.js"></script>
  
<script src="enex.js"></script>
If this library is not present, no traces are registered. As soon as this library is present, the EWC traces are displayed in the console windows of the browser.

EWC register each operation performed.

In your JavaScrip file, you have to call the getTrackingInformation function to retrieve the tracking logs. The function returns an array of Objects containing for each a category (debug, info, warning, error ), a time-stamp and an associated tracking item message.

function displayTracking( ) {
  
  var e = document.getElementById( "logs" );
  e.innerHTML = "";

  var log = enex.getTrackingInformation( );
  
  if ( log ) {

    // Format the record for screen display
    var r = "";
    for( i = 0 ; i < log.length ; ++i ) {
      
      switch( log[ i ].Category ) {
        
        case "Debug":
          r = "Debug - ";
          break;
          
        case "Info":
          r = "Info - ";
          break;
          
        case "Warning":
          r = "Warning - ";
         break;
        
        case "Error":
          r = "Error - ";
          break;
        
        default:
          r = "Unknown - ";
          break;
      }

      r += log[ i ].TimeStamp;
      r += " - ";
      r += log[ i ].Message;

      e.innerHTML += r;
    }
  }
}                
                        

Try it !


Click the button to collect the tracking logs