Skip to main content
Logging shows you what the SDK is doing and how it’s communicating with the peripheral. It’s the main tool Nayax uses to diagnose issues in both the SDK’s own behavior and its connection to the peripheral.

Configuration

To generate SDK logs, configure two flags in the main method. debug is a boolean that turns log generation on or off. dump_packets_level, in vmc_configuration, sets how much detail the SDK logs: The example below sets both flags together.

Log file location

Where the SDK writes its log file depends on which SDK you use:
  • On the C# SDK, logs save automatically to the bin\Debug folder in the directory you run the SDK from. For example:
  • On the C SDK, you set the log location by invoking the function below.
    C
    The SDK sends its log output to whatever board or console you configure. It’s up to you to decide where to write it:
    • Command line, as in the x86/Linux example below.
    • A UART port, as in the STM example below.
    • Any other destination you choose.
    C
    The C SDK’s demo app generates the log to the command line by default.
  • On the Java SDK, you set the default log file path in the FileWriter initialization, as shown below:
    Java
    In the example above, the log file is created at the root of the C: drive as out.txt. The true parameter in the FileWriter constructor appends new data to an existing log file instead of overwriting it.

See also

Log Trace Comparator

Once you have a log, run it through this tool to check it against known-good reference traces.