HomeGenie Forum

Development => Feature request => Topic started by: kevin1 on December 22, 2015, 04:01:17 PM

Title: CSV logfile
Post by: kevin1 on December 22, 2015, 04:01:17 PM
Should we make the logfile field separator a comma since it is a CSV file?  If it were proper CSV file it would load directly into excel without having to split text to columns.  Empty lines are problematic for data filter too.
Title: Re: CSV logfile
Post by: bkenobi on December 22, 2015, 04:06:01 PM
Not sure if that works since some of the output of logs includes debug data which both could include commas as well as multi-line.  I would prefer csv, but I don't think it's as easy as changing the separator from space to comma.
Title: Re: CSV logfile
Post by: Gene on December 22, 2015, 05:44:38 PM
Do not use the space char as the seperator. The separator is the [Tab] character "\t".
There's actually an issue with the timestamp that will result merged to the log level and the event source.
This issue can be fixed by adjusting the NLog.config file to have the "\t" separator as well:
https://github.com/NLog/NLog/wiki/CsvLayout
All other fields will be splitted consistently.

Cheers,
g.
Title: Re: CSV logfile
Post by: kevin1 on December 22, 2015, 06:14:37 PM
If comma is needed in a field, the field can be surrounded by double quote to allow comma (for excel anyway).