When post Config files or commands please look here
Also my apologies , you just want the hostname NOT the FQDN? is this correct? If so this maybe something you want.
string hostname()
Return the hostname (short form).
string hostname_fqdn()
Return the FQDN hostname. This function will return the short form if the FQDN hostname cannot be determined.
Look at my nxlog config file OUTPUT section, yours is incorrect.