Adding support for logging to the systemd journal.
dotnet build on the command line.
dotnet run on the command line to run as a console application.
To run as a service, copy the project2.service file to
systemctl start --user project2.service to start.
To publish, run
sudo dotnet publish -o /opt/Project2
This service writes "Hello World!" and log messages every 2 seconds. You can see this by running
systemctl status --user project2.service