Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Enable/Disable tLogRow by context value

Hi, many time I use tLogRow to "debug" a flow but when in production this component could be disabled. Since I usually have at least two context, one with the development values and the other one with the production values, it's possibile using a context variable enable/disable the tLogRow?

 

Thank you, Stefano.

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Stefano,

 

Yes, it's possible to disable the tLog row in the Prod. While you can see data in tLog in Dev.

0683p000009M61J.png

In tFixedFlow I have taken two column. 

0683p000009M6Ox.png

In the RunIf give the condition as [context.check==1] . Thus before trigger if you want to run in DEV set the context variable as 1 and If you want to run in prod set the context as 2.

 

0683p000009M6P2.png

 

After trigger in dev [context=1]

 

0683p000009M6P7.png

 

Trigger in Prod [context=2]

 

0683p000009M6PC.png

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hi Stefano,

 

Yes, it's possible to disable the tLog row in the Prod. While you can see data in tLog in Dev.

0683p000009M61J.png

In tFixedFlow I have taken two column. 

0683p000009M6Ox.png

In the RunIf give the condition as [context.check==1] . Thus before trigger if you want to run in DEV set the context variable as 1 and If you want to run in prod set the context as 2.

 

0683p000009M6P2.png

 

After trigger in dev [context=1]

 

0683p000009M6P7.png

 

Trigger in Prod [context=2]

 

0683p000009M6PC.png

Anonymous
Not applicable
Author

A second option, but it would disable ALL tLogRow components, is to set the global PrintStream used. So with a tSetVar conditioned by a context value, we can set the "tLogRow_CONSOLE" key as context.log?null:new java.io.PrintStream("NUL") (and under *nix the file name should be /dev/null). "context.log" is in my job a boolean variable.

 

It would be nice to have a configuration in tLogRow to set it has actually to log or just bypass, since building other structures inside a job make it complex for something is not related to the job work.

 

Stefano.