mcrossley wrote: ↑Fri 03 Feb 2023 10:16 pm
The separators under my control, the first two between the date and time are the same as used everywhere else.
The rest of the line is entered by the user, I have no control over that, it is free text. It can contain whatever the user wants; normally web tags separated by characters the help instructs you make the same as your other files. But if could contain fields that are text.
The only way I could control that would be by providing separate fields and the user has to enter the text for every column into each field individually. That would be very cumbersome and potentially use vast amounts of screen real estate.
I would think that once the user entered the string, before storing it it would be easy to check they are valid webtags and in the same process check the separator is the one used for the date and time (being the one elsewhere in the standard logs).
The user info is stored as one string in the inifile, not as fields, so I don't understand what you say about fields.
mcrossley wrote: ↑Fri 03 Feb 2023 10:16 pm
Do we have a problem here? Have users been creating custom log files with separators different from the locale default? I have not spotted any related posts.
Well, not sure if '
we' have a problem, but I have.
As it is, there is the possibility not only to have different separators in the string, but also in time if the user changes them along the way. I don't know what technique you use (or expect to be used) for reading the file, but at some point the content parameter needs to be split along the separators to isolate the webtags for further processing and interpretation. As you say, it is free text, making that exercise a punishment to handle it generically.
If you make the separator consistent (or demanding no separator at all) inserting it by CMX before storing, would make life a little lighter, bearable almost.
What could be the reason to give the user so much freedom here? Even totally free text without webtags would be legal?
I give a legal example here:
My tag is:
Code: Select all
IntervalEnabled1=1
IntervalFilename1=press
IntervalContent1=Humpy dumpy test without tags and now two at the end <#tempidally> <#hum> point.
IntervalIdx1=4
Leading to the following output:
Code: Select all
03-02-23;17:15;7.1,84,0.00
03-02-23;17:20;7.1,84,0.00
03-02-23;17:25;7.2,83,0.00
04-02-23;01:30;Humpy dumpy test without tags and now two at the end 92 point.
What could be the argument to permit this?
[EDIT:]Reading this post again: it might be just as easy to select the syntactically legal webtags from the garbage without thinking about the separators at all. That leaves just the question: why such freedom?