Using Console utility to get the full logs with admin perms but as a non admin user

consolepermissionterminal

I maintain at least 2 logins:

normal is non admin permissions

admin – to do those sometimes tasks but increase my security.

[10.11.6 EL Cap, not new logger system. I hope to get to that sometime but many steps before that arrives!]

As a normal user my Console shows many fewer messages than if I am logged in with admin permission. I prefer to try and have an admin level console available to me, without user switching which is too disruptive, so in normal I run terminal (iTerm2 for me) and:

su -l admin_self

sudo /Applications/Utilities/Console.app/Contents/MacOS/Console &

This works in that I see ALL parts of system and can access older system logs etc in this console BUT… I get lots of pasteboard permissions errors in my terminal at launch:

2018-11-25 12:31:07.502 Console[71471:18037307] CFPasteboardRef    CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2018-11-25 12:31:19.472 Console[71471:18037307] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2018-11-25 12:31:19.474 Console[71471:18037307] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data

and I get similar in error logs when swapping from/to the app. This is annoying, but more importantly I can't copy error text in this mode. So all those long paths etc create considerable blocks for me to go digging!

Any ideas on options to allow shared pb access? I can copy and paste between different terminal logins, but the host app (iTerm2) is always in my Normal environment. Maybe some switches, permissions I can safely fix, or some sort of pipe to localhost with a modified plist for a PrivConsole copy of Console or ???

Possibly helpful, I found remote pbcopy over ssh

and a similar, and unanswered question:

How to get output from the console.app from a non-admin account?
not sure if he does the same, terminal environment, partial solution that I do…

A bit more research by me: I get similar errors if I launch Console as my normal non-admin user in terminal; ALSO I get a bigger clue in this:

Failed to connect (_consoleX) outlet from (NSApplication) to (ConsoleX): missing setter or instance variable

Best Answer

A good work around, for me at least is lnav. It is probably more resource efficient than console, will run happily in an admin mode terminal session and offers:

  • filters
  • multiple file interleaving
  • choice over what log files where
  • understands a number of standard log file formats
  • colouring error/warnings (a bit lurid, maybe that can be configured)
  • neat help about where in log you are and the source of messages (if multi-file)
  • calculates message rates and can move to slower sections etc
  • bookmarking
  • time line summary (e.g. normal, error & warns errors in each 5 min block)
  • SQL query engine

And much more I'm sure, just starting here. A tool written by and for users I think! 10% of the memory and CPU of Console, more functions.

The binary download wants a later sqlite3 than standard mac distort so I brew'd the lot. Not sure how it works under the rewritten logging system!

So far? I'm thrilled!