How to save Terminal data to file

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

On-Site Servers

Please follow the below steps to save the terminal data to a file for on-site servers.

To log terminal data for specific assets 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 asset's Username and "Protocol" denotes the tracker 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 asset you want to log.
- `"Protocol"` with the name of the tracker Protocol used by the asset (e.g., "Teltonika", "Sensorlogic", "Meiligao").

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


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

Cloud Servers

For cloud servers, you can copy the terminal data (click on 'Copy logs' as shown in the image below) from the terminal window, paste it into a text file, and save the file.