Add Log Text In Multiple Lines

Hello all, I have a lot of text to log to Orchestrator but I want to do that using a single Log Message activity. I want this text to appear in different lines. Right now I am using ‘Environment.NewLine’ which is not working at all. Any ideas?

Thanks!

Hi @himanshu_punj1

You can write the multi-line log messages like this:

"Line 1" & vbCrLf & "Line 2" & vbCrLf & "Line 3"

Hope this helps,
Best Regards.

Hi @arjunshenoy it’s still getting printed to single line.

image

Thanks!

Hi @himanshu_punj1

You can try this expression : “var1”+vbLf+“var2”+vbLf+“var3”+vbLf+“var4”

Regards
Gowtham.K

@himanshu_punj1

On orchestrator if you want the logs to be in separate lines then you need to use separate log message activities…eqch activitiy comes as one line…

Newline character works in output console

Cheers

1 Like

@himanshu_punj1 Split your text to array of string as needed. Add for each loop with the array. Place log mesage actvity within the loop.

Not working.

Thanks, that’s an optimistic approach.

1 Like

Hi @himanshu_punj1

Can you try this approach.

LogMessageActivity.LogMessage(“This is line 1.” + Environment.NewLine + “This is line 2.”);

Thanks

2 Likes