AnsweredAssumed Answered

PI Vision extensibility - Uncaught ReferenceError: log is not defined

Question asked by Sasanka on Feb 17, 2020

Hi All,
In PI Vision development
log.add("Error:", log.Severity.Error, err.message, log.ClearType.DataUpdate); 
Works only in debug mode  (Config file setting : <compilation debug="true" targetFramework="4.5" />)

 

When I change to debug="false" , gives an error Uncaught ReferenceError: log is not defined

Here is my code: 
Setion 1: 

var def = {
typeName: 'BarGaugeVis',
inject: ['$http', 'log'],
displayName: 'Bar Gauge', ................

Section 2:
 limitGaugeVis.prototype.init = function (scope, element, $http, log) { ...............................

Section 3:
try{
..........................
} catch (err) {
log.add("Error:", log.Severity.Error, err.message, log.ClearType.DataUpdate);
}


Anybody have a clear idea for this?

Thanks.
Sasanka. 

Outcomes