2017-11-07 9 views
1

私はイオン・アプリでWL LoggerとWL Analyticsを実装しました。しかし、ログ(クライアント側+サーバー側)はコンソールに公開されていません。IBM MobileFirst 8.0.0 - WorkLightロガーとアナリティクスが動作しない

手順は次のとおりです。 - 1.私は自分のコンソールでMFPLoggerを有効にしました。

enter code here 
WL.Client.init({ 
    onSuccess : function() { 

     WL.Logger.config({ capture: true }); 
     WL.Analytics.init(this); 


enter code here 
WL.Analytics.addDeviceEventListener 
(WL.Analytics.DeviceEvent.NETWORK); 
WL.Analytics.addDeviceEventListener 
(WL.Analytics.DeviceEvent.LIFECYCLE); 
     setInterval(function() { 
     WL.Logger.send(); 

     WL.Analytics.send(); 
     }, 6000); 
     console.log("Success WL"); 
    }, 
    onFailure : function(err){ 

    } 
    }); 
//Client Side 
WL.Logger.info(response) 
WL.Analytics.log({type : message},message); 
//End 
//Server Side 
MFP.Logger.info(logging_message); 
//End 

を使用して 2.初期WL

+0

ionicアプリなしでも同じことができましたか? – krckumar

答えて

0

この1を試してみてください助けてください。

WL.Client.init({ 
    onSuccess : function() { 

     WL.Logger.config({ maxFileSize : 100000,    // allow persistent storage of up to 100k of log data 
     // level : 'info',     // at debug (and above) level 
     capture : true, 
     stringify: true     // capture data passed to log API calls into persistent storage 
     }); 

     WL.Analytics.enable().then(function (success) { 
     console.log(success); 
     }).fail(function (errObj) { 
     console.log(errObj); 
     }); 

     setInterval(function() { 
     WL.Logger.send(); 
     WL.Analytics.send(); 
     }, 6000); 
     console.log("Success WL"); 
    }, 
    onFailure : function(err){ 
     console.log("Failed WL"); 
     WL.Logger.error('Caught an exception', err); 
    } 
    }); 
関連する問題