Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
Since I dont have access to qmc, therefore I am not able to read log file. I have a requirement where I need to store the information of log in a text file of qlik app1 and further use this text file as a source to another qlik app2 which is a monitoring app for qlik app1.
Is there any way to do so?
Regards,
Neha
Hi @neha_sri
I understand you don't have access to the QMC; Where is your QlikApp1 running? in the Qlik Server or in your local PC? If you are running QlikSense desktop, the applications' log files are located at this folder:
C:\Users\<user>\Documents\Qlik\Sense\Log\Script
If these log files do not resolve your problem, Would you elaborate on what information you want to log?
Qlik's scripting language does not provide logging commands as such, the TRACE command allows you to create messages that are appended to the log files; another option is to develop a subroutine that you may call anywhere in your script passing text to be written into a Qlik's QVD; you need to use Sub..end sub and Call ; you could also create a subroutine with code like the one below to log data loads
// ----------------------------------------
// Create statistical data
// ----------------------------------------
LET vL.after=now();
LET vL.TableNumber=$(vL.TableNumber)+1;
let vL.TableName_$(vL.TableNumber) ='$(vL.TableName)';
let vL.NoOfRows_$(vL.TableNumber) = NoOfRows('$(vL.TableName)');
let vL.NoOfFields_$(vL.TableNumber) = NoOfFields('$(vL.TableName)');
let vL.TableTime_$(vL.TableNumber) =time(Timestamp('$(vL.after)') - timestamp('$(vL.before)'),'hh:mm:ss');
You should initialize vL.TableName prior to creating the statistical data, just like this:
// ----------------------------------------
LET vL.TableName='Product';
LET vL.before=now();
Hope this helps,