Urban Terror Forums: Excessive Console Messages - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Excessive Console Messages Rate Topic: -----

The OS Console, not UrT's.

#1 User is offline   sirgad Icon

  • Account: sirgad
  • Country:
  • Joined: 10-January 11
  • Posts: 8

Posted 10 January 2011 - 01:11 AM

Hi,

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.

#2 User is offline   Ateamrocks Icon

  • Account: ateamrocks
  • Country:
  • Joined: 11-March 10
  • Posts: 111

Posted 02 February 2011 - 10:21 PM

View Postsirgad, on 10 January 2011 - 01:11 AM, said:

Hi,

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.
B1naryTh1ef
:3

#3 User is offline   sirgad Icon

  • Account: sirgad
  • Country:
  • Joined: 10-January 11
  • Posts: 8

Posted 02 February 2011 - 11:36 PM

View PostAteamrocks, on 02 February 2011 - 10:21 PM, said:

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.


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 User is offline   Ateamrocks Icon

  • Account: ateamrocks
  • Country:
  • Joined: 11-March 10
  • Posts: 111

Posted 02 February 2011 - 11:56 PM

Ouch harsh for a new forumer. The hard way, is to get the source of UrT and compile it in a way it does not log the hits. I have no idea why it logs to the console, except for the fact that it's written in C, and that its purposely logging this information. Second, unless your log is getting to large, there should be a problem. If it is, turn on log buffering and log size limits. You can filter logs to find other information, so this isnt a problem of not being able to see important messages.


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
B1naryTh1ef
:3

#5 User is offline   sirgad Icon

  • Account: sirgad
  • Country:
  • Joined: 10-January 11
  • Posts: 8

Posted 03 February 2011 - 01:10 AM

View PostAteamrocks, on 02 February 2011 - 11:56 PM, said:

Ouch harsh for a new forumer. The hard way, is to get the source of UrT and compile it in a way it does not log the hits. I have no idea why it logs to the console, except for the fact that it's written in C, and that its purposely logging this information. Second, unless your log is getting to large, there should be a problem. If it is, turn on log buffering and log size limits. You can filter logs to find other information, so this isnt a problem of not being able to see important messages.


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.

bullet_loaderAdvertisement

#6 User is offline   Ateamrocks Icon

  • Account: ateamrocks
  • Country:
  • Joined: 11-March 10
  • Posts: 111

Posted 03 February 2011 - 02:25 AM

View Postsirgad, on 03 February 2011 - 01:10 AM, said:

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.


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
B1naryTh1ef
:3

#7 User is offline   3spades Icon

  •   verified donor   
    Support Guy
  • Account: 3spades
  • Country:
  • Joined: 28-February 10
  • Posts: 389

Posted 03 February 2011 - 03:45 AM

View PostAteamrocks, on 03 February 2011 - 02:25 AM, said:

Annoyed that I didnt think of this :L

That is what peer review is for.
urt.voxel.net :: Ruining your URT experience [2] weapons limited servers at a time.
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 User is offline   sirgad Icon

  • Account: sirgad
  • Country:
  • Joined: 10-January 11
  • Posts: 8

Posted 03 February 2011 - 11:57 PM

View Post3spades, on 03 February 2011 - 03:45 AM, said:

That is what peer review is for.

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

The >> should have been next to /dev/null, the & was in the wrong place, and the 2>&1 should follow the >>/dev/null.


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 User is offline   klabauterman Icon

  • Account: klabauterman
  • Main tag: aI|
  • Country:
  • Joined: 28-February 10
  • Posts: 245

Posted 16 February 2011 - 06:59 PM

Another possibilty is to simply NOT start Urt via Finder.app or an Automator action but - Terminal.app. Using Terminal.app will prevent stderr/stdout to be logged in Console.log.

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.


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942