# Logs and Troubleshooting

The TPVPC writes log files locally, on the same machine that runs the library or the local service. Their contents are not documented: to diagnose a failure, read the numeric code the function returned rather than the log text.

This guide applies to **TpvpcImplantado**.

## Choosing where the logs are written

On Linux, `fnDllSetLogPath` sets the directory the TPVPC writes its logs to:

```c
void fnDllSetLogPath(const char* cCustomLogPath);
```

`cCustomLogPath` is the path where the logs are generated. It may end in `/` or not. If you do not call this function, the logs go to `./` — the working directory of the process that loaded the library.

## Diagnosing a failure

Every TPVPC function returns a numeric code before any XML response, and the same number means different things depending on the function you called. That code, not the log file, is the primary diagnostic.

* [Result Codes and Errors](/en/get-central/tpvpc-reference/result-codes-and-errors) — the return codes per function, and the financial response codes.
* [Request Parameters](/en/get-central/tpvpc-reference/request-parameters) — the full list of functions and their input objects.

## Next steps

* [Process a Single-Step Payment](/en/get-central/tpvpc-payment-guides/process-a-single-step-payment) — run a standard card-present sale.