iTrace-Dev / iTrace-Core

iTrace Engine that interfaces with an eye tracker
http://www.i-trace.org/
GNU General Public License v3.0
6 stars 0 forks source link

Core logs should indicate the version used to generate them #191

Open psybers opened 1 year ago

psybers commented 1 year ago

The <itrace_core> tag currently includes attributes like the session id etc. It should also indicate which version of iTrace core was being run, which could aid replicability. I recommend adding a version attribute.

psybers commented 1 year ago

You can get the assembly's version with something like this:

using System;
using System.Reflection;

private string GetVersionString()
{
    return Assembly.GetEntryAssembly().GetName().Version.ToString();
}

and then in itrace_core/XMLGazeDataWriter.cs add this to the WriteSessionInformation() method (line 47):

xmlTextWriter.WriteAttributeString("version", GetVersionString());

Could possibly cache the version info into the session manager.