I have this service file to start my Java application
[Unit]
Description=StorageWebServer
[Service]
WorkingDirectory=/opt/StorageWebServer
ExecStart=/opt/java/openjdk/jdk-16.0.2/bin/java -jar /opt/StorageWebServer/StorageWebServer.jar
User=jvmapps
Type=simple
Restart=on-failure
RestartSec=10
StandardOutput=file:/opt/log.log
StandardError=file:/opt/log2.log
[Install]
WantedBy=multi-user.target
I have reloaded the file, restarted the service but still it is not writing the output to the folder.
Running on Amazon EC2 with Ubuntu