This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Getting started with Java programming language and have Ashish Sarin & J Sharma on-line!
See this thread for details.
Win a copy of Getting started with Java programming language this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to change Eclipse logging level  RSS feed

 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google hasn't helped me on this one. I want to change the default logging level in the Eclipse console window to "WARN". All the info messages are not helpful and just clutter up the console. I can't find anything in Preferences about this. The only log4j.properties file  is in C:\eclipse\plugins\org.apache.axis_1.4.0.v201411182030\lib. I changed that and restarted, but no change in the console.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36171
439
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The logging level of what? Eclipse sends System.out and System.err to console. And things that are from other likes like Tomcat and controlled by that log's level.

Can you give na example of something being output that you don't want?
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I should have been more specific. I want to get rid of the messages in red. In this case, at least they are separated, but often the program output is broken up by intervening INFO messages.

I think what would be ideal would be to have one console for System.out and another one for System.err, but I doubt if that is possible. This is Eclipse Mars, if that matters.

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36171
439
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah. That's coming from Spring. Since you (presumably) don't have any log settings configured, it is using the defaults - which is the console. The way to fix it is to add a logging properties file to the classpath of your Eclipse project. That way Java sees that and doesn't route to the console.

And all versions of Eclipse behave this way. Also, this should happen if you run at the command line too. It's not an Eclipse problem per se.
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Jeanne. I'll dig into the Spring logging. It's not a big deal, just a minor annoyance, so it will be nice to know how to correct it. I need more proficiency with log4j anyway, so this is a good exercise.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!