Any reason for the log not working?

Post your questions and help other users.

Moderator: Martin

Post Reply
manuel
Posts: 27
Joined: 05 Jul 2013 20:54

Any reason for the log not working?

Post by manuel » 30 Jul 2013 06:18

Hi,
I'm unable to make the logging work. I don't know if there is something special I should do for it to work.
I have a test workflow with only [Period Location Update] => [script: log(location);] and the location doesn't get written in the log. The workflow works, the automagic general information (workflow starting and the like) gets written, but the script writes nothing. I have tried changing log(location) with other things like log("***"); and still doesn't work.

Thanks in advance

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Any reason for the log not working?

Post by Martin » 30 Jul 2013 16:46

Hi,

Perhaps a filter is set to only show part of the log. You can remove the log filter with the pencil icon in the action bar.

Regards,
Martin

manuel
Posts: 27
Joined: 05 Jul 2013 20:54

Re: Any reason for the log not working?

Post by manuel » 30 Jul 2013 18:04

No, there is no filter. And I have checked with a workflow action and it works. I have added this to the flow (so now there are two parallel actions after the trigger) and one works and the other don't. Here is the log :
0.07.2013 19:57:08.687 [Flow4] Start executing action 'Script: log(location);'
30.07.2013 19:57:08.695 [Flow4] Start executing action 'Write to Log: {location}'
30.07.2013 19:57:08.715 [Flow4] Action 'Write to Log: {location}' null
30.07.2013 19:57:08.716 [Flow4] End executing action 'Write to Log: {location}'
30.07.2013 19:57:08.833 [Flow4] End executing action 'Script: log(location);'
30.07.2013 19:57:08.873 [Flow4] Flow ended.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Any reason for the log not working?

Post by Martin » 30 Jul 2013 18:40

Are you sure that the log is not filtered? Please open the unfiltered log from the flow list: Menu->Manage->Log. Don't open the log directly from the graphical flow editing screen.
Please publish the flow if the log line is still missing.

manuel
Posts: 27
Joined: 05 Jul 2013 20:54

Re: Any reason for the log not working?

Post by manuel » 30 Jul 2013 18:51

You are right! When I open the log from the flow there is a filter. I don't remember setting it, it is weird.
The filter is exactly the Flow name. May be this is set by default? I don't remember seeing this mentioned ianywhere (and I searched both in the help and in the forum before posting).
Thanks, it was driving me nuts trying alternatives.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Any reason for the log not working?

Post by Martin » 30 Jul 2013 19:06

The log is filtered when the log is opened from the flow edit screen. The title of the log should also show the text (filtered) in this case. You can remove the filter using the pencil icon on Android 3+ or using the menu on older Android versions. Simply remove the filter text in the dialog and press OK.
Unfortunately the log function in an action Script does not prepend the flow name so the log line seems to be missing when the log is filtered.
I will see if I can change the log function in a future version since this behavior is extremely confusing.

manuel
Posts: 27
Joined: 05 Jul 2013 20:54

Re: Any reason for the log not working?

Post by manuel » 30 Jul 2013 19:45

Martin wrote:I will see if I can change the log function in a future version since this behavior is extremely confusing.
It is, because the log lines don't appear precisely when you are debugging the flow an looking at the log from it :)
Anyway, everything is understood now. Thanks.

Post Reply