Go Back   The macosxhints Forums > OS X Help Requests > Applications



Reply
 
Thread Tools Rate Thread Display Modes
Old 02-28-2013, 02:14 PM   #1
hary536
Prospect
 
Join Date: Sep 2012
Posts: 8
Change Console preferences from command line?

Hi,
I want to automatically hide log list on console app instead of manually clicking on the icon in the tool bar of console or doing it through View Menu.
Is there a way to do it automatically? User can then show log list manually if he wants, but I want it to hide the log list by default.

I don't want to hide the Console app, but just the log list which we see on the left side of the console.

Thanks for your help in advance.
hary536 is offline   Reply With Quote
Old 02-28-2013, 03:40 PM   #2
DeltaMac
League Commissioner
 
Join Date: Jan 2002
Posts: 7,954
Viewing logs is the Console's main purpose in life...
You can view a huge variety of system messages in the console, and the listing helps you decide which log files will be relevant to you, and you will sometimes get very good information when having a problem with your system, or apps that you use.
What problem will be solved by not showing the system messages in the Console?
Why not just remove the Console, or prevent its use?
DeltaMac is offline   Reply With Quote
Old 02-28-2013, 04:28 PM   #3
chabig
Hall of Famer
 
Join Date: Jan 2002
Posts: 2,932
If you close the log list once, it will remain closed the next time and every subsequent time you launch Console.
chabig is offline   Reply With Quote
Old 02-28-2013, 04:28 PM   #4
macosnoob
MVP
 
Join Date: Jan 2007
Posts: 1,751
DeltaMac offers good arguments, questions to consider, and alternatives. Still, if only for the sake of exploring the OP's question, here's an answer.

(Under 10.6.8.) With Console not running, in Terminal:

defaults write com.apple.console LogOutlineViewVisible false


You would then need to lock com.apple.console.plist to make sure that Console always launches with the Log List hidden. But locking that plist may have unforeseen consequences. I couldn't say for certain.
macosnoob is offline   Reply With Quote
Old 03-02-2013, 03:17 PM   #5
hary536
Prospect
 
Join Date: Sep 2012
Posts: 8
Quote:
Originally Posted by DeltaMac
Viewing logs is the Console's main purpose in life...
You can view a huge variety of system messages in the console, and the listing helps you decide which log files will be relevant to you, and you will sometimes get very good information when having a problem with your system, or apps that you use.
What problem will be solved by not showing the system messages in the Console?
Why not just remove the Console, or prevent its use?

I agree with you. However, my purpose was little different.
What I am doing is that I have a script that writes continuous info to a .txt log file.
I open that log file in console since console shows the real-time updates to that log file unlike any text editor. I was trying to make that log window as less cluttered as possible to the user, else one would see a long list of other logs in the side bar.

Now, I did figure out the defaults write method as one of the commenters suggested. Wish there was a way to only apply the settings to the window in which my log file was open instead of universally applying to all console windows.

If you have any other suggestion for such a real-time display of log file contents, let me know, I am open to any better solution. So far, I found this as the only better solution than running the script in terminal which can also display the same messages as the log file.
hary536 is offline   Reply With Quote
Old 03-02-2013, 03:21 PM   #6
hary536
Prospect
 
Join Date: Sep 2012
Posts: 8
Quote:
Originally Posted by macosnoob
DeltaMac offers good arguments, questions to consider, and alternatives. Still, if only for the sake of exploring the OP's question, here's an answer.

(Under 10.6.8.) With Console not running, in Terminal:

defaults write com.apple.console LogOutlineViewVisible false


You would then need to lock com.apple.console.plist to make sure that Console always launches with the Log List hidden. But locking that plist may have unforeseen consequences. I couldn't say for certain.

Thanks. I did manage to figure that out. I tried on my 10.8.2 machine. I didn't try to lock the plist file since for my purpose I don't need to lock it, since in my script I update the plist before launching console.
Though I didn't find a little weird behavior,that if a console is open and if you quit it and immediately change the plist and then relaunch console it doesn't always write the changes. So, I put a delay of 1 second between my steps which seems to work at all times.
hary536 is offline   Reply With Quote
Old 03-02-2013, 03:27 PM   #7
hary536
Prospect
 
Join Date: Sep 2012
Posts: 8
Quote:
Originally Posted by macosnoob
DeltaMac offers good arguments, questions to consider, and alternatives. Still, if only for the sake of exploring the OP's question, here's an answer.

(Under 10.6.8.) With Console not running, in Terminal:

defaults write com.apple.console LogOutlineViewVisible false


You would then need to lock com.apple.console.plist to make sure that Console always launches with the Log List hidden. But locking that plist may have unforeseen consequences. I couldn't say for certain.

Wish there was a way to only apply the settings to the window in which my log file was open instead of universally applying to all console windows.
(I posted in previous comment why I am doing this hiding step)

Thanks.

Last edited by hary536; 03-02-2013 at 03:31 PM.
hary536 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 04:14 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.