Optional Log print based on environment

Hi Everyone,

I am using javascript to script my service tasks. I use print statement to see the logs. I was wondering If it possible to optionally execute that line based on the some flag or variable without wrapping that around if-else.

e.g. if flag is set to true
print(“Hello”) will print Hello
and if flag is false it will have no effect .

Hi @neu_10, I think the best solution here is to use the logging solutions provided by Camunda. If you log as debug, maybe that could help you.