log_format LB_log '$remote_addr forwarded for $http_x_realip - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent"'; access_log /path/to/you/log/directory/your-log-file-name.log LB_log;
After that, Nginx needs to be restarted/reloaded, of course 😉