How to save Terminal data to file

Terminal data of a vehicle typically refers to the information and status data transmitted from a vehicle's onboard terminal unit. This data includes various parameters and metrics that are essential for tracking and managing the vehicle's operations.

To log terminal data for specific vehicles using NLog.config, follow these steps:

1. Locate NLog.config File:
Edit the NLog.config file found under `C:\GpsGateServer\Franson NMEA Service`.

2. Update Configuration:
Identify the placeholders in the configuration where "Username" represents the vehicle's Username and "Protocol" denotes the device protocol (e.g., "Teltonika", "Sensorlogic", "Meiligao").

Add the following lines inside `<targets>` and `<rules>`:

<targets>
<target name="terminal.Username" xsi:type="File" layout="${longdate} | ${message}" fileName="C:\GpsGateServer\TerminalLog\${logger} ${shortdate}.log" />
... other targets ...
</targets>

<rules>
<logger name="Terminal.Protocol.Username" minlevel="Info" writeTo="terminal.Username" />
... other rules ...
</rules>

Ensure to replace:
- `"Username"` with the actual Username of the vehicle you want to log.
- `"Protocol"` with the name of the device Protocol used by the vehicle (e.g., "Teltonika", "Sensorlogic", "Meiligao").

By implementing the above configuration, each day, a new log file will be created for each device under `C:\GpsGateServer\TerminalLog\`.


Save the modified NLog.config file after making these additions.