Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Changing log4j log level in Console
Changing log4j log level in Console [message #653911] Fri, 11 February 2011 20:37 Go to next message
XQJ-37 is currently offline XQJ-37Friend
Messages: 1
Registered: February 2011
Location: Maryland
Junior Member
I am using Helios to develop Java and JavaEE projects. With my JavaEE projects I have associated an install of a JBoss server with my IDE.

I would like to use log4j and it's various log levels in my code but when running JBoss through the IDE and running my code on the IDE throught the app server I cannot get the console to output any log messages except INFO and higher.

If I fire up JBoss outside of Eclipse, and compile and build a .war file and then deploy it by hand, I get all of the debugging messages as I would expect.

I would like to be able to view them on the Console while developing as it would save a lot of time, but cannot see how to change the log level.

Any help is greatly appreciated.
Re: Changing log4j log level in Console [message #654650 is a reply to message #653911] Wed, 16 February 2011 15:13 Go to previous message
No real name is currently offline No real nameFriend
Messages: 1
Registered: February 2011
Junior Member
I had the same Problem and solved it this way:

You should find something like this in your %JBOSS_HOME%\server\default\conf\jboss-log4j.xml:

   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
      <param name="Target" value="System.out"/>
      <param name="Threshold" value="INFO"/>

      <layout class="org.apache.log4j.PatternLayout">
         <!-- The default pattern: Date Priority [Category] Message\n-->
         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>

<param name="Threshold" value="INFO"/>

To :
<param name="Threshold" value="DEBUG"/>

and the debug Entries will show in Console (Eclipse and normal)

If this is too much you can add some Limit categories a bit below.

[Updated on: Wed, 16 February 2011 15:14]

Report message to a moderator

Previous Topic:Missing Theme error in Workbench
Next Topic:Possible Documentation Bug?
Goto Forum:

Current Time: Mon Jun 25 15:42:03 GMT 2018

Powered by FUDForum. Page generated in 0.02960 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top