On prem agent
Logging
Viewing on-prem agent logs
Windows logs
If running as a Windows service you will be able to view all logs as Application logs:
If the agent is running in PowerShell, any activity will appear in the PowerShell terminal itself.
Linux logs
Likewise if the agent is installed as a service you will be able to view logs using journalctl
or whichever command your system uses.
If it is running in the terminal, any activity will appear there.