The \n in the String.Format method below within the Log.Info prints "\n" as a text instead of starting a new line; why it does not work? Any idea? How can I make it work?
Log.Info(String.Format("Some arguments : \n Since : {0}\nBefore: {1}\nLog file name : {2}", since, before,logFileName));
Thanks!
On windows, the line feed is actually \r\n
. Try Environment.NewLine
:
Log.Info(String.Format("Some arguments : "+Environment.NewLine+" Since : {0}"+Environment.NewLine+"Before: {1}"+Environment.NewLine+"Log file name : {2}", since, before,logFileName));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With