Logging
The TFTP Server can log events and transfer activity to a file for monitoring and troubleshooting. This is particularly important when running as a Windows service, where there is no graphical interface to observe activity.
Enabling file logging
To enable logging, go to Settings → Service tab:
- Check Log to file.
- Specify the Log file path, or use the default.
- Select the appropriate Log level.
Log file location
The default log file location depends on the installation type:
- Installed:
C:\ProgramData\SoftPerfect\TFTP Server\TFTPServer.log - Portable: Same directory as the executable.
Log levels
The log level controls how much detail is recorded:
- Error
- Only error messages are logged. Use this in stable production environments to minimise log file size.
- Warning
- Errors and warnings are logged. Warnings include issues that did not prevent operation but may indicate problems.
- Info
- General operational messages including server start/stop, transfer completions, and client connections. This is the recommended level for most situations.
- Debug
- Detailed diagnostic information including packet-level details. Use this only for troubleshooting specific issues, as it generates large log files.
Log format
Log entries follow this format:
[2024-01-15 14:30:45] [INFO] [192.168.1.100] [GET] [firmware.bin] Transfer complete, 1048576 bytes
Each entry includes:
- Timestamp — Date and time of the event.
- Level — ERROR, WARN, INFO, or DEBUG.
- Client IP — The client’s IP address (for transfer-related events).
- Direction — GET (download) or PUT (upload).
- Filename — The file being transferred.
- Message — Description of the event.
Server events (start, stop, configuration) omit the client-specific fields:
[2024-01-15 14:30:00] [INFO] TFTP Server service started successfully [2024-01-15 14:30:00] [INFO] Root directory: C:\TFTP [2024-01-15 14:30:00] [INFO] Port: 69
Log rotation
The server does not automatically rotate log files. For long-running servers, consider:
- Periodically archiving and clearing the log file.
- Using external log rotation tools.
- Monitoring log file size and clearing when needed via the GUI (Server → Clear Log).
Troubleshooting with logs
Common issues that can be diagnosed through logs:
- Connection refused — Check if the server started successfully and is listening on the expected port.
- File not found — Verify the root directory setting and file permissions.
- Access denied — Check IP filtering rules and access mode settings.
- Transfer timeouts — May indicate network issues or client problems.
- Extension blocked — File extension not in the allowed list.