Log storage
The EPAS Client Library will receive logging data from the terminal. This is stored in a series of files named Tracelog.txt
,
Tracelog_1.txt
, up to Tracelog_9.txt
. These files are automatically rotated and limited in size. Tracelog.txt
is the most recent file.
These log files will be useful if there is any unexpected behaviour in the terminal, e.g. a failed transaction or a problematic card.
These files are stored by default in the user’s temporary folder. On Windows 10 this is C:\Users\<username>\AppData\Local\Temp
.
The client can specify a more convenient location by modifying the value of StorageDirectory in the library’s Options
property, e.g.
string storage =
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
"EpasClientLibraryLogs");
try
{
Directory.CreateDirectory(storage);
mEpas.Options.StorageDirectory = storage;
}
catch (Exception ex)
{
Log("Unable to use " + storage + " for file storage: " + ex.Message);
}
This code fragment creates a directory under the users Documents folder and specifies that as the place for the library to store log files.