1

This problem is driving me crazy because I am not sure why this just started happening, and I have already wasted a week on it with absolutely no progress.

I am maintaining a legacy application running on JBoss 4.3 utilizing:

  • Struts2
  • Hibernate 3.2.5
  • Log4J 1.2.15
  • ojdbc5 (Oracle JDBC driver against Oracle 10g)
  • Apache Commons Logging 1.1 (Vile dependency required by brittle third party custom component)
  • c3p0 0.9.1.2

The log files have always been polluted with (what I am guessing is Apache?) garbage like:

07:37:04,024 DEBUG [Digester] New match='web-app/mime-mapping/extension'

07:37:04,024 DEBUG [Digester] Fire begin() for CallParamRule[paramIndex=0, attributeName=null, from stack=false]

07:37:04,024 DEBUG [sax] characters(tcl)

07:37:04,028 DEBUG [sax] endElement(,,extension)

07:37:04,028 DEBUG [Digester] match='web-app/mime-mapping/extension'

07:37:04,028 DEBUG [Digester] bodyText='tcl'

07:37:04,028 DEBUG [Digester] Fire body() for CallParamRule[paramIndex=0, attributeName=null, from stack=false]

07:37:04,028 DEBUG [Digester] Popping body text

I never really cared until recently when the following line has been followed by hundreds of thousands of lines of whitespace.

07:37:04,024 DEBUG [Digester] Pushing body text '

...

'

Now I care greatly because for auditing reasons we must maintain these log files indefinitely and they start out after server restart at around 20MB.

I initially figured that by disabling Sax Digester logging from log4j.properties that I solved the problem but nothing I have attempted has been working.

http://programming.itags.org/development-tools/59562/

https://community.jboss.org/thread/4401

http://www.coderanch.com/t/47763/Struts/disable-struts-debug-info-messages

http://mail-archives.apache.org/mod_mbox/logging-log4j-user/200210.mbox/%3CBOEGILGABHIJHEMDBOICMELICNAA.dparmar@cgmpsystems.com%3E

http://deepaksrivastav.com/?p=63

http://www.mail-archive.com/log4j-user@logging.apache.org/msg10703.html

Somebody here mentioned that their could be the possibility of a rogue log4j.properties or simplelog.properties floating around on the classpath that is causing me this grief but after an exhaustive witch hunt I find nothing is truly supressing the log file pollution.

Any help or advice would be greatly appreciated.

EDIT: A great suggestion below reminded me that I had already tried setting logging to WARN on everything within the JBoss log4j xml configuration file for this server instance. Literally nothing changed. I noticed that the temp files and working directories were not getting cleaned up properly too so I wiped them and still nothing. Hope this information helps and not scare away people thinking, "Man, that guy is screwed!" :)

Community
  • 1
  • 1
maple_shaft
  • 10,435
  • 6
  • 46
  • 74

1 Answers1

1

Turn off debug logging in server/xxx/conf/jboss-log4j.xml. Set it to info so that you will not see all these unnecessary logging lines

Timmo
  • 3,142
  • 4
  • 26
  • 43
  • Thanks for responding, but I forgot to mention that this was the first thing I tried. I will edit above. – maple_shaft Feb 08 '12 at 13:39
  • Can you post your jboss-log4j.xml please? – Timmo Feb 08 '12 at 13:43
  • I figured out what was wrong, it **was** jboss-log4j.xml after all! The XML was malformed. The developer whom I replaced must have been changing the log levels but forgot to close one of the commented out lines. Without syntax highlighting it was easy to miss the first time I looked at the file. It works perfectly now, thanks for leading me in the right direction! Still though I wonder what suddenly caused all of the whitespace? Thank you though, my solution was too localized to help anybody so I will accept your answer. – maple_shaft Feb 08 '12 at 13:55