Ny way to make Console prompt for authentication to logs the user isn’t authorised to

administratorconsolelogsmojave

If I try to access system.log from my non-admin account I get the message "Unable to read the file"

Is there any way to make Console.app prompt for administrator credentials to view logs the user isn't authorised to as happens elsewhere in the GUI?

Console

Presumably the message is because I'm not authorised:

A1398% ls -la /private/var/log/system.log
-rw-r-----  1 root  admin  1807993 Jan 23 16:14 /private/var/log/system.log

I know sudo /Applications/Utilities/Console.app/Contents/MacOS/Console will open Console.app with sufficient rights but it is rather inconvenient.

Best Answer

Console.app is not designed to prompt for credentials.

If you don't want to type the command every time or you don't want to remember it you have two similar choices:

Create a simple bash script or a nice automation with Automator and then you can place it everywhere you want.