Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Generating customized log file in qliksense

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

 

Labels (2)
1 Reply
Highlighted
Specialist
Specialist

Re: Generating customized log file in qliksense

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,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.