Lets start from the service file which is located at the following directory: /etc/systemd/system/ (You can use the "cd" command - cd /etc/systemd/system/).
The second step is to edit our service file, for that open the file for editing using "vim" editor. Use the following command sudo vim your_service.service.
Add the following lines under the [Service] at your service file.
SyslogIdentifier=[our service identifier] -> Just as it is(No brackets, no quotes)
In order to close the vim editor press ":" then write wq.
Now we have to create config file for the rsyslog so it would know to process our service's logs.
Access /etc/rsyslog.d/ directoy and create there a new config file name it at the same name you named you service: our_service.conf
Then place the following content at the file:
if $programname == '[our service identifier]' then /var/log/our_service.log & stop
Now give syslog the ability to write into our file:
chown syslog:adm /var/log/our_service.log
And the final step is to restart the rsyslog service:
sudo systemctl restart rsyslog