you can stop the rsyslog service using the sudo service rsyslog stop command. However, as the warning message indicates, stopping the rsyslog service will not necessarily prevent messages from being written to the log files if the syslog.socket unit is still active.
If you want to completely disable logging, you should disable or stop any other services or applications that might be writing to the log files. Additionally, you can also disable the syslog.socket unit to prevent any further messages from being logged:
bash
sudo systemctl disable syslog.socket
This command will prevent the syslog.socket unit from automatically starting on boot, which means that no further messages will be logged until the unit is manually started again.