By default, logs are sent to the
stderrfilehandle in the terminal. However, there may be times you wish to store logs in a file.
Prior to Gophish version 0.8.0, you can redirect logs from the terminal into a file using standard shell redirection:
$ ./gophish > gophish.log 2>&1
The downside to this is that logs will no longer show up in the terminal. Starting with Gophish version 0.8.0, you will have the option to configure additional logging directly within Gophish.
config.jsonfile, modify the
loggingsection to include whichever filename you wish to use for logging:
By configuring Gophish to send logs to a file, you also create the opportunity to send logs to external sources, such a SIEM. An example would be to use something like Filebeat to watch the log file and send the entries to an external source of your choosing.