Excessive Console Messages
The OS Console, not UrT's.
#2
Posted 02 February 2011 - 10:21 PM
sirgad, on 10 January 2011 - 01:11 AM, said:
I just happened to head into the ol' Console.app today to discover that every single UrT Console message from today was listed there - over 4000! I'd like to disable this. Can someone tell me how?
Many thanks,
S.
A. You shouldn't really disable loggin for UrT. It wants to log, so it should log.
B. There's no easy way to do it. (At least that I know of)
C. Clear the console, be done with it.
:3
#3
Posted 02 February 2011 - 11:36 PM
Ateamrocks, on 02 February 2011 - 10:21 PM, said:
B. There's no easy way to do it. (At least that I know of)
C. Clear the console, be done with it.
A. Why? Logging every single Console message (such as x hit x in the Kevlar for 29% damage) is excessive and unnecessary. It SHOULD be disabled, as this is not a valid entry for the log.
B. Then tell me the hard way.
C. Anyone willing to respond whose attitude is respectful?
#4
Posted 02 February 2011 - 11:56 PM
I didnt mean to be harsh, but there is really no way to easily turn this off (without modifying source files, or writing up complex scripts to sift through the console and delete those lines which you dont want), and as you can tell hundreds (if not thousands) of UrT mac users live with this.
-B1
:3
#5
Posted 03 February 2011 - 01:10 AM
Ateamrocks, on 02 February 2011 - 11:56 PM, said:
I didnt mean to be harsh, but there is really no way to easily turn this off (without modifying source files, or writing up complex scripts to sift through the console and delete those lines which you dont want), and as you can tell hundreds (if not thousands) of UrT mac users live with this.
-B1
Hi,
Following a very brief and helpful stint on the IRC channels, I have been presented with a viable and simple workaround for this problem. In short, redirect stdout and stderr to /dev/null. I tested this and it works just fine. For those who want to remove these unnecessary log entries from future instances of UrT on the Mac, I suggest creating an Automator action as follows:
1) Launch Automator (duh!), select Application template in the drop-down sheet and click Choose.
2) Choose Actions, then select Library in the left-hand column, and then perform a search for "Shell".
3) Drag and drop the only result ("Run Shell Script") into the right-hand column.
4) Delete the word "cat".
5) Now find your copy of ioUrbanTerror.app, right-click and choose to Show Package Contents.
6) In the window that opens, navigate to Contents>>Mac OS, then drag-and-drop the file ioUrbanTerror.ub to the Automator Action that you created (drag-and-drop to the place where you deleted "cat.") Automator will enter the full text path of the application.
7 )Append the following text to the end of the path (leave a space first):
>> 2&>1 /dev/null
8) Open the File menu, choose Save As... and choose a name and location for your new file. Make sure the Format drop-down menu is set to Application.
And you're done. If you want to be thorough, you can copy and paste the UrbanTerror file icon from the original application to the new Automator action. To run UrbanTerror in future, double-click the Automator action and not the original urbanTerror.app file.
Many thanks to [3Spades] and cry4dawn for the help.
S.
#6
Posted 03 February 2011 - 02:25 AM
sirgad, on 03 February 2011 - 01:10 AM, said:
Following a very brief and helpful stint on the IRC channels, I have been presented with a viable and simple workaround for this problem. In short, redirect stdout and stderr to /dev/null. I tested this and it works just fine. For those who want to remove these unnecessary log entries from future instances of UrT on the Mac, I suggest creating an Automator action as follows:
1) Launch Automator (duh!), select Application template in the drop-down sheet and click Choose.
2) Choose Actions, then select Library in the left-hand column, and then perform a search for "Shell".
3) Drag and drop the only result ("Run Shell Script") into the right-hand column.
4) Delete the word "cat".
5) Now find your copy of ioUrbanTerror.app, right-click and choose to Show Package Contents.
6) In the window that opens, navigate to Contents>>Mac OS, then drag-and-drop the file ioUrbanTerror.ub to the Automator Action that you created (drag-and-drop to the place where you deleted "cat.") Automator will enter the full text path of the application.
7 )Append the following text to the end of the path (leave a space first):
>> 2&>1 /dev/null
8) Open the File menu, choose Save As... and choose a name and location for your new file. Make sure the Format drop-down menu is set to Application.
And you're done. If you want to be thorough, you can copy and paste the UrbanTerror file icon from the original application to the new Automator action. To run UrbanTerror in future, double-click the Automator action and not the original urbanTerror.app file.
Many thanks to [3Spades] and cry4dawn for the help.
S.
Brilliant! I would horrify and developer or programmer, and probably makes a few babies cry, but very well done. Annoyed that I didnt think of this :L
-B1
:3
#7
Posted 03 February 2011 - 03:45 AM
Ateamrocks, on 03 February 2011 - 02:25 AM, said:
That is what peer review is for.
Kevlar in CTF is like sex with a condom. Sure you get the general feel of things, but everyone would enjoy the game without it.
#8
Posted 03 February 2011 - 11:57 PM
3spades, on 03 February 2011 - 03:45 AM, said:
And thank Goodness for peer review, because it turns out the shell command provided by cry4dawn was incorrect (for the Mac platform at least):
Quote
Oops! Cry4dawn's command resulted in log files being saved to the root of the Home directory ( ~ ); instead, the command to append is as follows:
>/dev/null 2>/dev/null
This is a correction for the information provided at Step 7 in my previous post.
Thanks and kudos to BobHarris at the Apple Discussions forums for this corrected information.
S.
#9
Posted 16 February 2011 - 06:59 PM
When you use Terminal.app to start up UrT in your preferred shell (zsh ftw!) via an alias and have given it enough memory (like maybe 10.000 lines), you will have all the logs in the terminal window, which will be gone upon closing that window.
But I guess this is only for nerds who love to fool around with the BSD under the hood.