Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
nstefaniuk
Creator III
Creator III

[10] Avoid logging a part of the script

Hello all.

I do a loop in my script and I would like to avoid to log all the loops in the log file. If I have 1000 loops, the final log file is about 20 MB, which is huge when the application is launched many times per day.

So it is possible to activate a stop-log option and deactivate it at a point of the script ?

If not, how can I achieve it ? Moving this part of the script in an hidden script ?

Thanks all.

1 Solution

Accepted Solutions
flipside
Partner - Specialist II
Partner - Specialist II

Yes, it appears you can declare a subroutine in the hidden script and call it from the main load and it won't log it - useful to know.

eg.

Hidden script ...

sub HiddenLog

let tablename= 'HiddenDataLoad' & floor(rand()*1000);

$(tablename):

load hiddenFld as $(tablename) inline [

hiddenFld

1

2

3

4

5

6

7

8

9];

end sub

... logs as ...

25/01/2013 09:08:09:   Joining/Keeping

25/01/2013 09:08:09: 0055  Call HiddenLog

25/01/2013 09:08:09: 0056  Call HiddenLog

25/01/2013 09:08:09: 0057  Call HiddenLog

25/01/2013 09:08:09: 0059  MoreData:

flipside

View solution in original post

2 Replies
flipside
Partner - Specialist II
Partner - Specialist II

Yes, it appears you can declare a subroutine in the hidden script and call it from the main load and it won't log it - useful to know.

eg.

Hidden script ...

sub HiddenLog

let tablename= 'HiddenDataLoad' & floor(rand()*1000);

$(tablename):

load hiddenFld as $(tablename) inline [

hiddenFld

1

2

3

4

5

6

7

8

9];

end sub

... logs as ...

25/01/2013 09:08:09:   Joining/Keeping

25/01/2013 09:08:09: 0055  Call HiddenLog

25/01/2013 09:08:09: 0056  Call HiddenLog

25/01/2013 09:08:09: 0057  Call HiddenLog

25/01/2013 09:08:09: 0059  MoreData:

flipside

nstefaniuk
Creator III
Creator III
Author

Thanks it works as expected. I would prefer a flag to activate / deactivate but at least it's a good workaround.

Thanks