MacOS – user-friendly app that can create an archive of system.log files and the like

applicationslogsmacosscript

Background

I have this command to create a temporary collection of selected log files –

sudo tar -czf $TMPDIR/archive\ of\ install.log\ and\ system.log\ files\ only.tgz --options='compression-level=9' /private/var/log/*install* /private/var/log/*system* && sudo chmod 666 $TMPDIR/archive\ of\ install.log\ and\ system.log\ files\ only.tgz && open $TMPDIR

– but it's usable only if the user at the command line is an administrator.

A Pacifist view of an archive produced by that command:

enter image description here

Question

For OS X, is there a user-friendly third party app that can create an archive of a comparable collection of log files?

The ideal app:

  • should work for normal users (and if so, must prompt for administrator credentials, which will be required to access some of the data)

  • may be relatively system-agnostic (not limited to Mountain Lion).


Approaches that I have ruled out

Console

It's great for many things, but not for collecting and archiving in the way outlined above.

Finder

It's user friendly but I'd prefer something that can perform the collection in a single step, or two – without browsing to the source directory. Moreover:

  • a normal user can not use Finder to compress the required files.

Apple sysdiagnose

It's powerful and fairly comprehensive, but can be unexpectedly time-consuming.

Only the most recent system.log file is archived.

Best Answer

Could you use an AppleScript like this?

do shell script "tar --disable-copyfile -cf ${TMPDIR}logs.tar /var/log/{system,install}.log*" with administrator privileges

It requires entering the username and password of an admin user though.