Author Topic: Output multiple lines to log  (Read 1408 times)

cyberblitz

  • Newbie
  • *
  • Posts: 3
Output multiple lines to log
« on: February 01, 2021, 04:17:02 AM »
Is there any way to output multiple lines to the log? I have an inline script that produces a list of items, but when i try to output the items to the log, they all appear on one line. It would be nice to output to multiple lines..

Any ideas?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Output multiple lines to log
« Reply #1 on: February 01, 2021, 08:44:51 AM »
If you want to produce multiple log entries, you can use a foreach loop or similar construct to split your list into one-line entries, and write each to the log by calling the WriteToLog() method once per entry.

Using "blank" as the color (or the shorthand overload of the WriteToLog() method that omits the color parameter entirely) can help to visually group a list of items after another item (that does have a colored icon in front of it), if that's something you're looking to do.