This article describes how to show hostname in forward traffic log.
The FortiGate does not resolve the IP address to host names for the traffic logs by default.
To resolve the IP addresses to host names, apply the following settings.
To enable the name resolution of traffic log from the CLI :
# conf log setting
set resolve-ip enable
From GUI, go to Log & Report, Log settings toggle the Resolve Hostnames option .
Make sure this setting is applied:
# conf log gui-display
set resolve-hosts enable