The Digi IoT Device Simulator logs to:

  • The file DeviceSimulator.log

  • The standard output

By default, it logs errors, warnings, and info messages. To enable debug level use -d parameter when launching. See Launch parameters.

File log

The IoT Device Simulator logs to the file DeviceSimulator.log inside the logs directory of the installation folder, <installation_path>/logs/DeviceSimulator.log.

This log file is created in both possible launch modes: interactive or unattended. See Show log output in interactive mode to be able to simultaneously see IoT Device Simulator log output.

The application automatically rolls and archives the current log file, and resumes logging in a new file if log size is greater than 10MB. There could be a maximum of 10 archived files with name DeviceSimulator.log.<n>.gz, where <n> is an index between 1 and 10.

Log files older than 30 days are automatically removed.

Console log

When working in unattended mode, the IoT Device Simulator outputs log information to the standard output as well as logging it to a file. The log data and level is the same for both systems.

To enable debug level use -d parameter when launching. See Launch parameters.

Show log output in interactive mode

When working in interactive mode, you can only see the output of the commands you execute. The complete log is redirected to the log file, <your_simulator_folder>/logs/DeviceSimulator.log.

If you need to get more information about of the running simulation in real time, you can read the log file as it is written. To do so:

  1. Open a PowerShell console: Press the Windows key on your keyboard and type PowerShell.

  2. Execute:

    PS C:\> Get-Content <your_simulator_folder>\logs\DeviceSimulator.log -Wait -Tail 30
  1. Open a terminal and execute

    $ tail -F <your_simulator_folder>/logs/DeviceSimulator.log

These commands output last lines of the log file as it is being written. This way you can work with the CLI and simultaneously review in the other terminal more details of the ongoing processes.

Custom code logging

Custom code log output is redirected to the file user_app.log inside the logs directory of the installation folder. For more information see Manage custom code log output.