I have a problem with threads. We have a web application that has its own logging object(for logging onto a log file or to console).And if I start another threads (for eg: to constantly write incoming messages onto a file etc), for some reason, the logger is not logging messages anymore either on to the console or to the log file, but the code is getting executed.We have tomcat and weblogic running on different environments for the web application.
What could be the possible reasons for such issues. Iam not sure if the new threads are getting more priority than the original application process threads. Can anyone give any ideas for resolving this issue?
You have not specified what kind of logging utility u r using. Is that Log4J? Logging utilities will be designed in such a way to leverage performance benefits in web applciations. When you actually log a message using log utility's method, the method jsut takes the message and hand that over to it's internal threads and your method call(thread of execution) returns simply from that method without getting involved in doing the IO.
Your doubt may be correct : Application threads are having higher priority over Logging threads. More over just cross check your configuration settings of Logging. Logging utilities can filter log messages based on the severity and the settings defined in configuration.
Thanks,<br />Bhanu<br />SCEA Step-I<br />SCBCD for J2EE 1.3<br />SCJP1.4
Joined: Dec 03, 2004
Bhanu, we are using Log4j. I checked to make sure that the new threads do not have any synchronized methods. I will check log cofiguration too.If i comment out the code that starts new threads, the application is functioning normally. But starting new threads is imperative.