Problem

Appending the text of a string within a log file but omit specific sections of white space.

Details

So I am working on a logging functionality and I am trying to get a little fancy with the details of the log entry. Utilizing PowerShell, I am appending the strings to the log; however, I have stumbled upon a small problem and was hoping that there is a simple solution that would allow me to keep the overall format of my code.

When I have my code as follows:

```
WriteLog -LogName "somename" -Message "$User did some action
                                       `r`n-- $file was modified"

```

The text within the log file displays as:

```
04:37:33 PM SOMEUSER did some action

-- SOMEFILE was modified

```

Rather than

```
04:37:33 PM SOMEUSER did some action
-- SOMEFILE was modified

```

To my understanding, this is due to the white space in the string of my code being translated literally to the log file. 

I have also attempted rewriting the code as:

```
WriteLog -LogName "somename" -Message "$User did some action" +
                                      "`r`n-- $file was modified"

```

But ended with an error stating it could not do this. Is there a way to maintain the code layout (for readability) and tell the application to ignore that white space? Or will I need to modify my application to fit my needs?