So I have a Minecraft server that is being hosted on Google Cloud Platform. To start the server I use the command
java -Xmx1024M -jar spigot.jar -o true
When I used this command to launch the server it would show me the server logs (people connecting/disconnecting, etc.) but the problem was that when I used that command to launch, whenever I would exit out of the SSH in GCP it would shut down the server. To fix it I started running the server in the background using the command
nohup java -Xmx1024M -jar spigot.jar -o true &
After using this command I don't see the server logs anymore. I know that in Ubuntu/Linux you can store Java output on a file (ex: .txt file).
The Question: Say I create a file called logs.txt, with what command can I save the server logs onto that .txt file?
I'm a newbie with bash/linux (you can probably tell) so all help is greatly appreciated!
Happy New Year!